spread defaultvalue is incorrectly ssr'd

#16479

Development PR

Issue

Solved
K
KTibow
Jul 22, 2025, 6:49 PM

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):

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

Info

Closed at Sep 11, 2025, 1:10 AM
Assignees None
Labels None
Milestone None