Closed Majorfi closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated |
---|---|---|---|---|
seafood | ✅ Ready (Inspect) | Visit Preview | 💬 Add your feedback | Feb 10, 2023 at 3:27AM (UTC) |
Hey!
I would agree with you on the expect/don't expect, but I got rug way too many time so now I tend to put checks everywhere to avoid app-crash It's not the nicest code, but this save some hotfixes later imo
But this should not prevent the data to be here, indeed
Add some safety checks to prevent crashed on undefined.
We have this function in the web-lib that could help to avoid theses issues:
I also suggest to add the
?.
notation for all nested properties and to always use a fallback!