Skip to content

Commit d440ae9

Browse files
Fixed swatch-renderer js console error on edit cart product
1 parent ea71192 commit d440ae9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1265,7 +1265,9 @@ define([
12651265
dataMergeStrategy: this.options.gallerySwitchStrategy
12661266
});
12671267
}
1268-
gallery.first();
1268+
if (gallery) {
1269+
gallery.first();
1270+
}
12691271
} else if (justAnImage && justAnImage.img) {
12701272
context.find('.product-image-photo').attr('src', justAnImage.img);
12711273
}

0 commit comments

Comments
 (0)