Skip to content

Commit bc3f534

Browse files
authored
ENGCOM-5965: Fixed swatch-renderer js console error on edit cart product #24753
2 parents 560d110 + f5eac82 commit bc3f534

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

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

0 commit comments

Comments
 (0)