Skip to content
Permalink
Browse files
changing error output
  • Loading branch information
dhirk committed Nov 7, 2019
1 parent 5c63dca commit 22e2b0d6ffdf79f81384dd72c830cc75d7177193
Showing 1 changed file with 1 addition and 1 deletion.
@@ -9,7 +9,7 @@ module.exports.clear = () => {

module.exports.add = (item, qty) => {
qty = Number(qty)
if(isNaN(qty)) throw new Error('the quantity must be a number')
if(isNaN(qty)) throw new Error('qty must be a number')
data.push({item: item, qty: qty})
}

0 comments on commit 22e2b0d

Please sign in to comment.