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

Commit

Permalink
chore: bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
freefony committed Apr 12, 2018
1 parent eac84cc commit 97d1a2e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions dist/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,12 @@

var getStockAmount = function getStockAmount(stock, product) {
var amount = 0;
if (stock[product].amount && typeof stock[product].amount === 'number') {
amount = stock[product].amount;
} else if (typeof stock[product] === 'number' || !isNaN(parseInt(stock[product], 10))) {
amount = stock[product];
if (stock[product]) {
if (stock[product].amount && typeof stock[product].amount === 'number') {
amount = stock[product].amount;
} else if (typeof stock[product] === 'number' || !isNaN(parseInt(stock[product], 10))) {
amount = stock[product];
}
}
return amount;
};
Expand Down
2 changes: 1 addition & 1 deletion dist/bundle.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 97d1a2e

Please sign in to comment.