Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxt): add missing process.client for early redirect in navigateTo #7625

Merged
merged 3 commits into from Sep 19, 2022

Conversation

huang-julien
Copy link
Member

πŸ”— Linked issue

resolve nuxt/nuxt#14890

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Hi πŸ‘‹ , this PR is a small fix adding process.client to early redirect on client side for navigateTo(). There's also a small test to ensure the http status code is correct.

However there's an issue using navigateTo in async middlewares which throws a nuxt instance not available error. I believe this has been already reported in some issues.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@netlify
Copy link

netlify bot commented Sep 17, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit d9a89d8
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/63282b0b0eb1dd00082a9f5d

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find!

test/basic.test.ts Outdated Show resolved Hide resolved
@pi0 pi0 merged commit c4fe852 into nuxt:main Sep 19, 2022
@pi0
Copy link
Member

pi0 commented Sep 19, 2022

Thanks!

@pi0 pi0 mentioned this pull request Sep 20, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

navigateTo in middleware loses options on server side
3 participants