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 @@ -1238,6 +1238,11 @@ define([
1238
1238
1239
1239
if ( ! _ . isUndefined ( gallery ) ) {
1240
1240
gallery . updateData ( imagesToUpdate ) ;
1241
+ } else {
1242
+ context . find ( this . options . mediaGallerySelector ) . on ( 'gallery:loaded' , function ( loadedGallery ) {
1243
+ loadedGallery = context . find ( this . options . mediaGallerySelector ) . data ( 'gallery' ) ;
1244
+ loadedGallery . updateData ( imagesToUpdate ) ;
1245
+ } . bind ( this ) ) ;
1241
1246
}
1242
1247
1243
1248
if ( isInitial ) {
@@ -1248,6 +1253,7 @@ define([
1248
1253
dataMergeStrategy : this . options . gallerySwitchStrategy
1249
1254
} ) ;
1250
1255
}
1256
+
1251
1257
} else if ( justAnImage && justAnImage . img ) {
1252
1258
context . find ( '.product-image-photo' ) . attr ( 'src' , justAnImage . img ) ;
1253
1259
}
You can’t perform that action at this time.
0 commit comments