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

<SanityContent> Duplicate keys detected #116

Closed
ovsw opened this issue Apr 12, 2021 · 5 comments
Closed

<SanityContent> Duplicate keys detected #116

ovsw opened this issue Apr 12, 2021 · 5 comments
Labels
bug Something isn't working question Further information is requested

Comments

@ovsw
Copy link

ovsw commented Apr 12, 2021

For any block content from sanity, if the block content contains <strong> marks (bold text) Nuxt will throw a warning in development (browser console):

vue.runtime.esm.js?2b0e:619 [Vue warn]: Duplicate keys detected: ''. This may cause an update error.

found in

---> <SanityContent>

In my component, all I do is:

<SanityContent  :blocks="blocktext"  />

where blocktext is the block content from Sanity.
The text renders ok in the front-end though.

Why is this happening? Am I doing something wrong?

Version

module: 0.9.0 (and previously 0.7.1)
nuxt: 2.15.5

@ovsw ovsw added the question Further information is requested label Apr 12, 2021
@TimHill83
Copy link

TimHill83 commented Apr 17, 2021

I'm getting this too. Is it a bug in the way it's rendered, or is there a way round it? I'm using it in the same way as above

@ovsw
Copy link
Author

ovsw commented May 3, 2021

maybe should have marked this as a bug, I really don't see any way of using <SanityContent/> that doesn't cause the errors.

@danielroe danielroe added the bug Something isn't working label May 3, 2021
@filippolcr
Copy link

@danielroe @ovsw @TimHill83 These errors are shown only with yarn dev.

image

Not detected with yarn generate && yarn start with target static.

"nuxt": "2.15.4" and "@nuxtjs/sanity": "0.9.2"

@danielroe
Copy link
Collaborator

Thanks! Should be fixed in v0.9.4 ❤️

@TimHill83
Copy link

TimHill83 commented May 15, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants