devhausleipzigacademy / camp10-finalProject

2 stars 2 forks source link

Fix jobcard error #77

Closed pswu11 closed 1 year ago

pswu11 commented 1 year ago

Error in main branch:

Unhandled Runtime Error

Error: Objects are not valid as a React child (found: [object Date]). 
If you meant to render a collection of children, use an array instead.

The problem occurs when you create a new job that has a deadline from new job form. It has something to do with different return types on deadline when it's null and when it's not. Perhaps a refactor could solve it more elegantly but for now just a quick fix.