Skip to content
This repository was archived by the owner on Jan 14, 2020. It is now read-only.

Commit 97d1a2e

Browse files
committed
chore: bundles
1 parent eac84cc commit 97d1a2e

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

dist/bundle.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,12 @@
8888

8989
var getStockAmount = function getStockAmount(stock, product) {
9090
var amount = 0;
91-
if (stock[product].amount && typeof stock[product].amount === 'number') {
92-
amount = stock[product].amount;
93-
} else if (typeof stock[product] === 'number' || !isNaN(parseInt(stock[product], 10))) {
94-
amount = stock[product];
91+
if (stock[product]) {
92+
if (stock[product].amount && typeof stock[product].amount === 'number') {
93+
amount = stock[product].amount;
94+
} else if (typeof stock[product] === 'number' || !isNaN(parseInt(stock[product], 10))) {
95+
amount = stock[product];
96+
}
9597
}
9698
return amount;
9799
};

dist/bundle.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)