Skip to content

Commit e9c42d2

Browse files
committed
✨ Use jQuery
1 parent f349c0e commit e9c42d2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,7 @@ define([
342342

343343
if (!productId) {
344344
// Check individual product.
345-
var product = document.getElementsByName('product')[0];
346-
productId = product ? product.value : undefined;
345+
productId = $('[name=product]').val();
347346
isInProductView = productId > 0;
348347
}
349348

0 commit comments

Comments
 (0)