Skip to content

Commit 4e4eeb7

Browse files
committed
ACP2E-295: Product swatch base image thumb js issue fixes
1 parent 65714d4 commit 4e4eeb7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,9 +1248,10 @@ define([
12481248
*/
12491249
_setImageType: function (images) {
12501250
var initial = this.options.mediaGalleryInitial[0].img;
1251+
var mediaGalleryInitial = this.options.mediaGalleryInitial;
12511252

1252-
if (images[0].img === initial) {
1253-
images = $.extend(true, [], this.options.mediaGalleryInitial);
1253+
if (images[0].img === initial && (images.length === mediaGalleryInitial.length)) {
1254+
images = $.extend(true, [], mediaGalleryInitial);
12541255
} else {
12551256
images.map(function (img) {
12561257
if (!img.type) {

0 commit comments

Comments
 (0)