Replies: 2 comments
-
I would suggest having more strict types and using tools to cover possible issues. For example, you could so something like: <script lang="ts">
let foo: any = {};
</script>
Error page
{foo.bar?.length} The question mark after bar says to only check for length if bar exists. You could also do something like this: <script lang="ts">
let foo: any = {};
</script>
Error page
{foo.bar ? foo.bar.length : ""} This allows you to set up backup options to cover potential errors. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Sometimes the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a SvelteKit website with multiple pages and navigation between them. When user navigates to a page, which can't be rendered because of an error, the navigation stops working completely and the app becomes unresponsive.
The error page can be as simple as this:
My question is: how do I recover the app from this error state? What is the best way to handle rendering errors?
Beta Was this translation helpful? Give feedback.
All reactions