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

navigateTo always redirects to the '/' #681

Closed
AndreyYolkin opened this issue Jan 9, 2023 · 0 comments · Fixed by #682
Closed

navigateTo always redirects to the '/' #681

AndreyYolkin opened this issue Jan 9, 2023 · 0 comments · Fixed by #682

Comments

@AndreyYolkin
Copy link
Contributor

Environment


  • Operating System: Linux
  • Node Version: v16.15.1
  • Nuxt Version: 2.15.8
  • Nitro Version: 1.0.0
  • Package Manager: pnpm@7.22.0
  • Builder: vite
  • User Config: components, serverMiddleware, modules, buildDir, plugins, nitro, bridge, runtimeConfig, serverHandlers, devServerHandlers, devServer, typescript, buildModules
  • Runtime Modules: ()
  • Build Modules: (), @nuxt/bridge@3.0.0

Reproduction

Just call navigateTo on serverSide and pass url, which differs from '/'

Describe the bug

const redirectLocation = isExternal ? toPath : joinURL(useRuntimeConfig().app.baseURL, router.resolve(to).fullPath || '/')

Because vue-router v4 API differs from vue-router v3, resolve in v3 returns object, and we need extra .resolved property to access resoled location full path.

Additional context

No response

Logs

No response

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

Successfully merging a pull request may close this issue.

1 participant