Skip to content

Commit 7feaedd

Browse files
author
niravkrish
committed
Code Improvement suggested by orlangur
1 parent ee64ecd commit 7feaedd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ define([
12241224

12251225
imagesToUpdate = this._setImageIndex(imagesToUpdate);
12261226

1227-
if (typeof gallery === undefined) {
1227+
if (typeof gallery == 'undefined') {
12281228
context.find(this.options.mediaGallerySelector).on('gallery:loaded', function (loadedGallery) {
12291229
loadedGallery = context.find(this.options.mediaGallerySelector).data('gallery');
12301230
loadedGallery.updateData(imagesToUpdate);
@@ -1242,7 +1242,7 @@ define([
12421242
});
12431243
}
12441244

1245-
if (typeof gallery === undefined) {
1245+
if (typeof gallery == 'undefined') {
12461246
context.find(this.options.mediaGallerySelector).on('gallery:loaded', function (loadedGallery) {
12471247
loadedGallery = context.find(this.options.mediaGallerySelector).data('gallery');
12481248
loadedGallery.first();

0 commit comments

Comments
 (0)