Merge branch 'master' of code.areya.de:Areya/areya-energy

master
Benjamin Völkl 2022-09-04 12:05:11 +02:00
commit 865a8f1624
1 changed files with 1 additions and 1 deletions

View File

@ -279,7 +279,7 @@
localStorage.setItem("products", JSON.stringify(objProducts)); localStorage.setItem("products", JSON.stringify(objProducts));
let quantitys = objProducts.map(obj => obj.quantity); let quantitys = objProducts.map(obj => obj.quantity);
let quantityOfProducts = 0; 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); $('#count-products-in-bag').text(quantityOfProducts);
$('#list-products-in-bag').html(''); $('#list-products-in-bag').html('');
if(typeof updateProducts === "function") $('#list-products').html(''); if(typeof updateProducts === "function") $('#list-products').html('');