SuperSimpleDev / javascript-course

594 stars 477 forks source link

`if(!cart)` -> `if(!cart.length < 1)` #102

Closed japaroooo closed 2 months ago

japaroooo commented 2 months ago

Cart is not getting its default value after emptying. Anyone also encounter it? If not, I need your help

japaroooo commented 2 months ago

It's seems weird since it's working now after changing if (!cart) into if (cart.length < 1)... Isn't an empty array !cart is faulty also 🤔