Skip to content

Commit 39cc4c2

Browse files
author
Oleksii Korshenko
committed
MAGETWO-66321: Check of null result value in swatch-renderer.js #8923
- Merge Pull Request #8923 from aholovan/magento2:patch-2
2 parents f0c22cd + 269c215 commit 39cc4c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -868,13 +868,13 @@ define([
868868
}
869869
);
870870

871-
if (result.oldPrice.amount !== result.finalPrice.amount) {
871+
if (typeof result != 'undefined' && result.oldPrice.amount !== result.finalPrice.amount) {
872872
$(this.options.slyOldPriceSelector).show();
873873
} else {
874874
$(this.options.slyOldPriceSelector).hide();
875875
}
876876

877-
if (result.tierPrices.length) {
877+
if (typeof result != 'undefined' && result.tierPrices.length) {
878878
if (this.options.tierPriceTemplate) {
879879
tierPriceHtml = mageTemplate(
880880
this.options.tierPriceTemplate,

0 commit comments

Comments
 (0)