Skip to content

Commit beda62f

Browse files
author
Oleksii Korshenko
committed
MAGETWO-69541: #7959 - Fix for JS error on Swatch Renderer for undefined oldPrice #9776
- Merge Pull Request #9776 from dreamworkers/magento2:fix/7959-oldprice-swatchrenderer
2 parents cedeca0 + 8e43515 commit beda62f

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

Lines changed: 1 addition & 1 deletion
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)