master
parent
53f1938ef1
commit
8fe8bb77d4
|
@ -245,7 +245,7 @@
|
|||
localStorage.setItem("products", JSON.stringify(objProducts));
|
||||
let quantitys = objProducts.map(obj => obj.quantity);
|
||||
let quantityOfProducts = 0;
|
||||
for(let i = 0; i < quantitys.length; i++) { quantityOfProducts += Number(quantitys[i]); }
|
||||
for(let i = 0; i < quantitys.length; i++) { if(Number.isInteger(Number(quantitys[i]))) quantityOfProducts += Number(quantitys[i]); }
|
||||
$('#count-products-in-bag').text(quantityOfProducts);
|
||||
$('#list-products-in-bag').html('');
|
||||
if(typeof updateProducts === "function") $('#list-products').html('');
|
||||
|
|
Loading…
Reference in New Issue