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

The nuxt-link component does not respect the external prop #25866

Closed
Adamkillander96 opened this issue Feb 19, 2024 · 1 comment · Fixed by #25887
Closed

The nuxt-link component does not respect the external prop #25866

Adamkillander96 opened this issue Feb 19, 2024 · 1 comment · Fixed by #25887

Comments

@Adamkillander96
Copy link

Environment

  • Operating System: Darwin
  • Node Version: v21.1.0
  • Nuxt Version: 3.10.2
  • CLI Version: 3.10.1
  • Nitro Version: 2.8.1
  • Package Manager: npm@10.2.0
  • Builder: -
  • User Config: ssr, target, experimental, app, vue, css, modules, storyblok, build, vite, nitro, hooks, routeRules, imports, runtimeConfig, devtools
  • Runtime Modules: @storyblok/nuxt@6.0.4, @pinia/nuxt@0.5.1
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-prqbf9?file=app.vue

Describe the bug

If you use a nuxt-link with the custom and external prop and click on it, a console.error will occur complaing about the nuxt-link not having the external prop set to true, even though it is.

The navigation itself still works, its just a console.error that occurs before you leave the page.

The interesting part is that the replace prop is respected, but not external.

Additional context

I think the issue is coming from this file:
https://github.com/nuxt/nuxt/blob/9326b7a8bde1ae793ba046f7dacc4ebbe200b786/packages/nuxt/src/app/components/nuxt-link.ts#L357C15-L357C23

The replace prop is included here, but not external.

Logs

No response

Copy link

stackblitz bot commented Feb 19, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@Adamkillander96 Adamkillander96 changed the title The nuxt-link component does not respect for the external prop The nuxt-link component does not respect the external prop Feb 20, 2024
@DamianGlowala DamianGlowala self-assigned this Feb 20, 2024
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.

2 participants