-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Open
Description
Describe the bug
take a component that includes an input with a defaultvalue (set via spreading). if you ssr the component, it fails to properly stringify this.
Reproduction
svelte repl link (go to js output and enable server): https://svelte.dev/playground/hello-world?version=5.36.13#H4sIAAAAAAAAA22NwQrCMBBEf2XZk4LUe6gFb36BF-MhNlsIrGloNlYJ-XcTKJ48zmPeTEZvnoQKL8Q8wzovbGFH1gnZPR5wckwR1S2jfELrNVD5Zp1D6OKLWBp7mEj_-Dh7IS91Bvs4Li7IoL2WiqOANWLgBBksTSaxXA0nUqBxyxqhaN8ff2LvfEgCueu65hY4DvVD6C2oZElU7jUZx6vzFtVkOFL5Am8TIenmAAAA
the issue can be distilled down to
import * as $ from 'svelte/internal/server'; console.log($.spread_attributes({ defaultValue: 'default' }, null))
returning defaultvalue="default"
instead of value="default"
Logs
System Info
System:
OS: Linux 6.14 Ubuntu 25.04 25.04 (Plucky Puffin)
CPU: (12) arm64 unknown
Memory: 8.75 GB / 14.20 GB
Container: Yes
Shell: 4.0.1 - /usr/bin/fish
Binaries:
Node: 24.4.0 - ~/.local/share/pnpm/node
npm: 11.4.2 - ~/.local/share/pnpm/npm
pnpm: 10.11.0 - ~/.local/share/pnpm/pnpm
Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels