Skip to content

Commit 118a197

Browse files
Merge pull request #1157 from magento-engcom/2.1-develop-prs
[EngCom] Public Pull Requests - 2.1 - MAGETWO-69541: #7959 - Fix for JS error on Swatch Renderer for undefined oldPrice #9776
2 parents cedeca0 + c2780ec commit 118a197

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)