0

I have noticed that when running my pages through html validation it is flagged that my links have a to="[object Object] which is not valid HTML.

I am using Nuxt Links in Nuxt Vue, the to is used to provide the link in the code, but this is converted into a href while leaving this when compiled, which seems to serve no purpose:

<a href="/home" to="[object Object]">Home</a>

Is there a way to remove the to from links using Vue Nuxt?

karl
  • 321
  • 3
  • 16
  • what's the source? shold be something like `Home`? – Iron Bishop Jan 19 '23 at 12:33
  • you should provide the source code as well (the ` – Damzaky Jan 19 '23 at 12:53
  • Probably missing the `:to` here since you're passing an object. What do you have in your DOM? Inspect with your devtools to see if the HTML is valid. A nuxt link should compile properly. Otherwise, feel free to share a [repro] + the validator you're using. – kissu Jan 19 '23 at 14:13

0 Answers0