Skip to content

Commit f5eac82

Browse files
ENGCOM-5965: Fixed swatch-renderer js console error on edit cart product #24753
- Merge Pull Request #24753 from ravi-chandra3197/magento2:patch-console-error-edit-cart-product - Merged commits: 1. d440ae9 2. 256c7af
2 parents ea71192 + 256c7af commit f5eac82

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)