Skip to content

Commit

Permalink
Merge branch 'JS-323' of https://github.com/ulaharbmg/magento2ce into…
Browse files Browse the repository at this point in the history
… JS-323
  • Loading branch information
anastasiiabuniak committed Dec 23, 2015
2 parents a5da1d8 + 39aa50f commit 1cda33a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,7 @@ define([
t,
tmpVideoData,
currentItem,
iconClass = 'video-thumb-icon',
videoContainerClass = 'fotorama-video-container';
iconClass = 'video-thumb-icon';

if (!fotorama.activeFrame.$navThumbFrame) {
$(this.element).on('fotorama:showend', $.proxy(function (evt, fotoramaData) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,8 @@ define([
var justAnImage = images[0],
updateImg,
imagesToUpdate,
gallery = context.find(this.options.mediaGallerySelector).data('gallery');
gallery = context.find(this.options.mediaGallerySelector).data('gallery'),
item;

if (images) {
imagesToUpdate = this._setImageType($.extend(true, [], images));
Expand All @@ -905,11 +906,8 @@ define([
return img.isMain;
});

if (updateImg.length) {
gallery.updateDataByIndex(0, updateImg[0]);
} else {
gallery.updateDataByIndex(0, imagesToUpdate[0]);
}
item = updateImg.length ? updateImg[0]: imagesToUpdate[0];
gallery.updateDataByIndex(0, item);

gallery.seek(1);
} else {
Expand Down

0 comments on commit 1cda33a

Please sign in to comment.