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

Warning: Found 2 elements with non-unique id #null #167

Closed
illright opened this issue Dec 5, 2020 · 3 comments
Closed

Warning: Found 2 elements with non-unique id #null #167

illright opened this issue Dec 5, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@illright
Copy link
Owner

illright commented Dec 5, 2020

TextFields and other components that have the id as a prop default to that ID being null for some reason, which is the reason of warnings in the console like:

Found 2 elements with non-unique id #null
@illright illright added the bug Something isn't working label Dec 5, 2020
@aabounegm
Copy link
Collaborator

This seems to be an issue with Sapper's rendering (though I couldn't find any related open issue on their repo). This is because if I navigate to https://illright.github.io/attractions/docs/components/text-field by first going to https://illright.github.io/attractions/docs/ and then clicking on "TextField", I don't get this error. Even when going to that page directly, the null id is only present in the page source (CTRL + U), but not actually on the element if you inspect it through the DevTools.

@illright
Copy link
Owner Author

illright commented Dec 8, 2020

Yeah, when I investigated, I also came to the conclusion that Sapper renders out the null-valued props and Svelte removes them afterwards. Been meaning to create an MCVE and open an issue to Sapper

@illright
Copy link
Owner Author

illright commented Dec 8, 2020

Follow sveltejs/svelte#5756 for progress on this issue

@illright illright changed the title Null ID issue Warning: Found 2 elements with non-unique id #null Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants