Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this.$nuxt.error() causes error.vue to render incorrectly (using fetch >= 2.12) #7727

Closed
rmirabelle opened this issue Jul 17, 2020 · 4 comments

Comments

@rmirabelle
Copy link

I'm still trying to wrap my head around the nearly insurmountably confusing usage of fetch() and its impact on error.vue

My current understanding is that error.vue is always rendered as either a Component or a Page, but never a Layout.
Already confusing.

Old fetch and throw new Error act like they're supposed to:

If I call the 'old' (< 2.12) version of fetch, with a context argument, then call context.error('whatever'), OR if I simply throw new Error('whatever'), error.vue is rendered as expected - a Page, whose layout property is properly respected.

New fetch does what??

If I call the new (>= 2.12) version of fetch() with no arguments, then call this.$nuxt.error('whatever'), error.vue appears to be forcibly rendered INLINE as a Component that completely ignores its own layout property and renders inside the current layout instead.

I assume this is a bug in this.$nuxt.error()?

Surely, this can't be the expected behavior, i.e. completely changing the way error.vue is rendered based solely on the this context that new fetch provides?

@asmeeee
Copy link

asmeeee commented Jul 17, 2020

This was reported in #7567 and is supposed to be fixed by #7654, but I still encounter a similar scenario.

@minawalphonce
Copy link

Not fixed in 2.13.3 related #7743

@stale
Copy link

stale bot commented Aug 22, 2020

Thanks for your contribution to Nuxt.js!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you would like this issue to remain open:

  1. Verify that you can still reproduce the issue in the latest version of nuxt-edge
  2. Comment the steps to reproduce it

Issues that are labeled as pending will not be automatically marked as stale.

@stale stale bot added the stale label Aug 22, 2020
@stale stale bot closed this as completed Aug 29, 2020
@bpeab
Copy link

bpeab commented Sep 16, 2020

Still an issue, the stalebot shouldn't close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants