From 8fe8bb77d4db676dabdfa5d0e3c55973d016e41e Mon Sep 17 00:00:00 2001 From: Gustavo Luigi Date: Sat, 3 Sep 2022 11:12:22 +0200 Subject: [PATCH] . --- content/master.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/master.blade.php b/content/master.blade.php index 8871782..d42883b 100644 --- a/content/master.blade.php +++ b/content/master.blade.php @@ -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('');