basir / amazona

Build Ecommerce Like Amazon By MERN Stack
https://www.udemy.com/course/build-ecommerce-website-like-amazon-react-node-mongodb
597 stars 483 forks source link

Unhandled Rejection (TypeError): Cannot read property 'product' of null #101

Closed shyam8523023069 closed 3 years ago

shyam8523023069 commented 3 years ago

Unhandled Rejection (TypeError): Cannot read property 'product' of null (anonymous function) In video-15 I got this error

Help me to solve this

error

shyam8523023069 commented 3 years ago

Here in this code, the cartItem variable is getting initialized with only a NULL value in it and because of that, I am getting TypeError.