-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
fix: emit each_key_duplicate
error in production
#16724
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 89a3f0f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
I feel a bit weird about adding a less-cryptic error for when I also realised as a result of this PR that |
Checking other cases requires computations. We cannot even do |
Co-authored-by: Rich Harris <[email protected]>
Co-authored-by: Rich Harris <[email protected]>
I vote for merging this. I just ran into this and it's really annoying to debug. Yes it's not going to catch all cases but I'd rather fail with a runtime error that gives me a hint at what goes wrong compared to a cryptic "undefined" runtime error. |
I tried to move |
I moved |
Btw, in prod the error isn't caught by boundary. I need help here. |
Added the error emitting for the non-crashing case. |
Closes #15339
It looks like duplicate keys cause crashing only in one place.
In some cases it still can successfully render the list but will crash soon anyway, so I don't see reasons to add other checks.
Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.packages/svelte/src
, add a changeset (npx changeset
).Tests and linting
pnpm test
and lint the project withpnpm lint