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

Commit 47e2b00

Browse files
committed
chore: builds
1 parent 7c5ada0 commit 47e2b00

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

dist/bundle.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,10 @@
8787
var national = void 0;
8888

8989
var getStockAmount = function getStockAmount(stock, product) {
90-
var amount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
91-
92-
if (!isNaN(parseInt(stock[product].amount, 10))) {
90+
var amount = 0;
91+
if (stock[product].amount && typeof stock[product].amount === 'number') {
9392
amount = stock[product].amount;
94-
} else if (!isNaN(parseInt(stock[product], 10))) {
93+
} else if (typeof stock[product] === 'number' || !isNaN(parseInt(stock[product], 10))) {
9594
amount = stock[product];
9695
}
9796
return amount;

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)