File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
app/code/Magento/ConfigurableProduct/view/frontend/web/js Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,12 @@ define([
139
139
} ) ;
140
140
141
141
$ . each ( queryParams , $ . proxy ( function ( key , value ) {
142
- this . options . values [ key ] = value ;
142
+ if ( this . options . spConfig . attributes [ key ] !== undefined
143
+ && this . options . spConfig . attributes [ key ] . options . find ( function ( element ) {
144
+ return element . id === value ;
145
+ } ) ) {
146
+ this . options . values [ key ] = value ;
147
+ }
143
148
} , this ) ) ;
144
149
} ,
145
150
@@ -155,7 +160,13 @@ define([
155
160
156
161
if ( element . value ) {
157
162
attributeId = element . id . replace ( / [ a - z ] * / , '' ) ;
158
- this . options . values [ attributeId ] = element . value ;
163
+
164
+ if ( this . options . spConfig . attributes [ attributeId ] !== undefined
165
+ && this . options . spConfig . attributes [ attributeId ] . options . find ( function ( optionElement ) {
166
+ return optionElement . id === element . value ;
167
+ } ) ) {
168
+ this . options . values [ attributeId ] = element . value ;
169
+ }
159
170
}
160
171
} , this ) ) ;
161
172
} ,
You can’t perform that action at this time.
0 commit comments