Sohaib-Snouber / web_project

1 stars 0 forks source link

TypeError: Cannot read properties of null #3

Closed Sohaib-Snouber closed 4 hours ago

Sohaib-Snouber commented 5 hours ago

When trying to access a database for a specific variable to assign it to frontend by using the useState function, and nothing is received, that mean null, then the error is specified as followed: TypeError: Cannot read properties of null

image
Sohaib-Snouber commented 4 hours ago

The problem has been solved with this commit 3075c97ca43ce34ab961febc472a27ac691027b4. That will check if the logged-in user already has a resume and if it has sections in it. If that is not true, then the sections will be an empty array.