Skip to content

Commit 8e43515

Browse files
author
Abhisek Pandey
committed
#7959 - Fix for JS error on Swatch Renderer for undefined oldPrice
1 parent e1e4617 commit 8e43515

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ define([
711711
}
712712
);
713713

714-
if (result.oldPrice.amount !== result.finalPrice.amount) {
714+
if (typeof result != 'undefined' && result.oldPrice.amount !== result.finalPrice.amount) {
715715
$(this.options.slyOldPriceSelector).show();
716716
} else {
717717
$(this.options.slyOldPriceSelector).hide();

0 commit comments

Comments
 (0)