Skip to content

Commit 567082b

Browse files
committed
MAGETWO-35379: Gallery images are not loaded for Configurable Product
- adopt functionality in order to pass functional tests
1 parent 80effc4 commit 567082b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/code/Magento/ConfigurableProduct/view/frontend/web/js/configurable.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ define([
7171
this.options.values = this.options.spConfig.defaultValues || {};
7272
this.options.parentImage = $('[data-role=base-image-container] img').attr('src');
7373

74-
this.initialGalleryImages = $(this.options.mediaGallerySelector).gallery('option', 'images');
74+
this.initialGalleryImages = $(this.options.mediaGallerySelector).data('mageGallery')
75+
? $(this.options.mediaGallerySelector).gallery('option', 'images')
76+
: [];
7577
this.inputSimpleProduct = this.element.find(this.options.selectSimpleProduct);
7678
},
7779

0 commit comments

Comments
 (0)