node-react-ecommerce
node-react-ecommerce copied to clipboard
Quantity concatenates instead of adding
If you have more than one item in the cart and you change the quantity, the "subtotal _ items" will concatenate the values instead of adding them. I.e, if you have qty of 1, 2, and 1, it will now appear as "subtotal 121 items", and it continues concatenating even if they're all returned to a qty value of 1. This is because the "qty" value is an integer, but is programmed to become a string if changed to any number greater than 1. You can see this on the console in my screenshot.