File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
app/code/Magento/Swatches/view/frontend/web/js Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1239,6 +1239,11 @@ define([
1239
1239
1240
1240
if ( ! _ . isUndefined ( gallery ) ) {
1241
1241
gallery . updateData ( imagesToUpdate ) ;
1242
+ } else {
1243
+ context . find ( this . options . mediaGallerySelector ) . on ( 'gallery:loaded' , function ( loadedGallery ) {
1244
+ loadedGallery = context . find ( this . options . mediaGallerySelector ) . data ( 'gallery' ) ;
1245
+ loadedGallery . updateData ( imagesToUpdate ) ;
1246
+ } . bind ( this ) ) ;
1242
1247
}
1243
1248
1244
1249
if ( isInitial ) {
@@ -1249,6 +1254,7 @@ define([
1249
1254
dataMergeStrategy : this . options . gallerySwitchStrategy
1250
1255
} ) ;
1251
1256
}
1257
+
1252
1258
} else if ( justAnImage && justAnImage . img ) {
1253
1259
context . find ( '.product-image-photo' ) . attr ( 'src' , justAnImage . img ) ;
1254
1260
}
You can’t perform that action at this time.
0 commit comments