Skip to content

get_store_value() called twice in SSR mode #3375

@tivac

Description

@tivac

Describe the bug
I was playing around with trying to repro a bug I'm seeing in SSR mode and happened to notice something weird in the output. Not critical, mind you, but still probably worth fixing?

To Reproduce
REPL repro

Open that REPL link, switch to the "JS Output" tab, and switch from DOM to SSR mode to see the issue.

const App = create_ssr_component(($$result, $$props, $$bindings, $$slots) => { let $style; let style = readable("foo"); $style = get_store_value(style); $style = get_store_value(style); return `${escape($style)}`; });

Expected behavior
I don't think $style = get_store_value(style); should be output twice.

Information about your Svelte project:

  • Svelte 3.7.1

Severity
Not very

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions