Can anyone fix this bug? 😊 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can anyone fix this bug? 😊

So, I've found this great "add to cart" project but it has a bug; when you press the add to cart button more than 6 times and subsequently delete the items you get something like "-2" items in your cart 😅 Does anyone know how to fix it? Link: https://codyhouse.co/demo/add-to-cart-interaction/index.html

30th Oct 2018, 10:02 AM
Foued
Foued - avatar
2 Answers
+ 2
It only happens when you add items too quickly, faster than the time it takes to display. So you might get 6 items in the cart but the number 4 is displayed due to delay so once 6 items are removed you get -2. Could you possibly show us the code?
30th Oct 2018, 10:11 AM
jtrh
jtrh - avatar
30th Oct 2018, 10:42 AM
Foued
Foued - avatar