Skip to content

Commit

Permalink
Fixed-magento#18017 magento 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
niravkrish committed Dec 8, 2018
1 parent 52130ac commit b92bbc4
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,15 @@ define([
}

imagesToUpdate = this._setImageIndex(imagesToUpdate);
gallery.updateData(imagesToUpdate);

if (gallery === undefined) {
context.find(this.options.mediaGallerySelector).on('gallery:loaded', function (loadedGallery) {
loadedGallery = context.find(this.options.mediaGallerySelector).data('gallery');
loadedGallery.updateData(imagesToUpdate);
}.bind(this));
} else {
gallery.updateData(imagesToUpdate);
}

if (isInitial) {
$(this.options.mediaGallerySelector).AddFotoramaVideoEvents();
Expand Down

0 comments on commit b92bbc4

Please sign in to comment.