You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While easily mitigated by v-if="data" and similar conditions, this is a major DX downgrade from Nuxt 2 experience where we could throw error in asyncData and not have to worry about template or computed accessing properties of undefined.
Environment
Linux
v16.14.2
3.0.0-rc.8
npm@7.17.0
vite
-
-
-
Reproduction
https://stackblitz.com/edit/github-8gwl3q?file=app.vue
Describe the bug
If
useAsyncData
returns an error,throw createError(...)
doesn't work properly. Template errors are being caused and error 500 is rendered.Actual:
Cannot read properties of undefined (reading 'attr')
) is rendered if template usesstate.attr
Cannot read properties of undefined (reading 'something')
) is rendered if template usesdata.something
state.attr
nordata.something
Expected:
Additional context
#13788
Logs
No response
The text was updated successfully, but these errors were encountered: