svelte
svelte copied to clipboard
fix: ensure undefined attributes are removed during hydration
Attributes set server-side but undefined on the client should be removed during hydration. This ensures expected cleanup behavior and resolves a mismatch between SSR and client-side rendering.
Fixes sveltejs/svelte#16184
🦋 Changeset detected
Latest commit: 574def131957c4358e85917771405bfaef5b6ab9
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| svelte | Patch |
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
Preview: https://svelte-dev-git-preview-svelte-16178-svelte.vercel.app/
Please, add a test that fails without this fix. Propably it should go to the hydration folder, you can at the input-value-changed test as example of what you need.
I’ve added the test under hydration named removes-undefined-attributes. It will fail without the fix, confirming the issue is properly covered.