Skip to content

Regression: svelte:component with spread props loses static props #9177

Closed
@PatrickG

Description

@PatrickG

Describe the bug

It looks like #9006 introduced a bug.
When changing this and a spread props object, static props are not passed to the new component.
Also, it seems like the old spread props are passed to the new component first and then get changed to the new spread props.

Reproduction

https://svelte.dev/repl/c967016570194f1e90a1226132377e61?version=4.1.1
When clicking "page1" or "page2", it always should log "toto", instead undefined and "<Page2> was created without expected prop 'test'" is logged.

Also "<Page2> was created with unknown prop 'page1Prop'" is logged, which indicates the old spread props are passed to the new component.

REPL is working on version 4.1.0: https://svelte.dev/repl/c967016570194f1e90a1226132377e61?version=4.1.0

Logs

No response

System Info

REPL with Svelte 4.1.1

Severity

blocking an upgrade

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions