if (type= "cut") {
if(cartData[index].counts>1){
console.log("fk");
cartData[index].counts-=count;
}
console.log(count);
console.log(cartData[index].counts);
}
console.log(cartData);
it turns out that if it is 2, you can"t subtract 1 or 2
.