Skip to content

Commit 1cda33a

Browse files
Merge branch 'JS-323' of https://github.com/ulaharbmg/magento2ce into JS-323
2 parents a5da1d8 + 39aa50f commit 1cda33a

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

app/code/Magento/ProductVideo/view/frontend/web/js/fotorama-add-video-events.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,7 @@ define([
366366
t,
367367
tmpVideoData,
368368
currentItem,
369-
iconClass = 'video-thumb-icon',
370-
videoContainerClass = 'fotorama-video-container';
369+
iconClass = 'video-thumb-icon';
371370

372371
if (!fotorama.activeFrame.$navThumbFrame) {
373372
$(this.element).on('fotorama:showend', $.proxy(function (evt, fotoramaData) {

app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,8 @@ define([
893893
var justAnImage = images[0],
894894
updateImg,
895895
imagesToUpdate,
896-
gallery = context.find(this.options.mediaGallerySelector).data('gallery');
896+
gallery = context.find(this.options.mediaGallerySelector).data('gallery'),
897+
item;
897898

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

908-
if (updateImg.length) {
909-
gallery.updateDataByIndex(0, updateImg[0]);
910-
} else {
911-
gallery.updateDataByIndex(0, imagesToUpdate[0]);
912-
}
909+
item = updateImg.length ? updateImg[0]: imagesToUpdate[0];
910+
gallery.updateDataByIndex(0, item);
913911

914912
gallery.seek(1);
915913
} else {

0 commit comments

Comments
 (0)