Skip to content

BUG: Variable not defined when awaited and rendered inside a snippet #16665

@kroniapp

Description

@kroniapp

Describe the bug

I’m using the experimental async flag.

When rendering an awaited variable inside a snippet — without explicitly declaring it in the snippet parameters — the console throws the following error:

Uncaught (in promise) ReferenceError: value is not defined

I’m currently on v5.38.3. This was working correctly in v5.38.2.

Reproduction

https://stackblitz.com/edit/sveltejs-kit-template-default-ry9pp9kr?file=src%2Froutes%2F%2Bpage.svelte

Logs

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 20.19.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    svelte: 5.38.3 => 5.38.3

Severity

blocking an upgrade

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions