Skip to content

Commit 73ef119

Browse files
committed
#19184: Static test fix.
1 parent 01e8ff1 commit 73ef119

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,8 @@ define([
713713
$wrapper = $this.parents('.' + $widget.options.classes.attributeOptionsWrapper),
714714
$label = $parent.find('.' + $widget.options.classes.attributeSelectedOptionLabelClass),
715715
attributeId = $parent.attr('attribute-id'),
716-
$input = $parent.find('.' + $widget.options.classes.attributeInput);
716+
$input = $parent.find('.' + $widget.options.classes.attributeInput),
717+
checkAdditionalData = JSON.parse(this.options.jsonSwatchConfig[attributeId]['additional_data']);
717718

718719
if ($widget.inProductList) {
719720
$input = $widget.productForm.find(
@@ -753,9 +754,7 @@ define([
753754
$widget.options.jsonConfig.optionPrices
754755
]);
755756

756-
var checkAdditionalData = JSON.parse(this.options.jsonSwatchConfig[attributeId]['additional_data']);
757-
758-
if (1 == checkAdditionalData['update_product_preview_image']) {
757+
if (checkAdditionalData['update_product_preview_image'] === '1') {
759758
$widget._loadMedia();
760759
}
761760

0 commit comments

Comments
 (0)