Skip to content

Commit 30c3eac

Browse files
author
niravkrish
committed
Code Improovement and changes as suggested
1 parent 95d5f44 commit 30c3eac

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
@@ -1223,7 +1223,7 @@ define([
12231223
}
12241224

12251225
imagesToUpdate = this._setImageIndex(imagesToUpdate);
1226-
if (gallery === undefined) {
1226+
if (typeof gallery === undefined) {
12271227
context.find(this.options.mediaGallerySelector).on('gallery:loaded', function (loadedGallery) {
12281228
loadedGallery = context.find(this.options.mediaGallerySelector).data('gallery');
12291229
loadedGallery.updateData(imagesToUpdate);
@@ -1241,7 +1241,7 @@ define([
12411241
});
12421242
}
12431243

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

0 commit comments

Comments
 (0)