Skip to content

ReferenceError when assigning a snippet #15812

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
buhrmi opened this issue Apr 21, 2025 · 1 comment
Closed

ReferenceError when assigning a snippet #15812

buhrmi opened this issue Apr 21, 2025 · 1 comment

Comments

@buhrmi
Copy link
Contributor

buhrmi commented Apr 21, 2025

Describe the bug

When assigning a snippet that contains dynamic content to a variable, and then attempting to @render the snippet, it will give a ReferenceError.

In the provided reproduction, you can see that it work with static content (setContent1 button), but errors out with dynamic content (setContent2 button).

Reproduction

https://svelte.dev/playground/c3bbe052fdfc4e87a46ccd9091ee002b?version=5.20.5#H4sIAAAAAAAAE4WRTWvDMAyG_4rRLi2MluQY2m6jDHbeDjssO6SOAmaeY2xlHxj_91mpS7rSrQeD_eR9ZEUOYJp3hAoesUOHRuK9c72Da-iURg_VSwD6tpxgkHjO31m78B-oidmu8XiOy94QGkplYOWlU5Y2takpYU-C8IvEWtTwgFr34rl3uq2Bv_PSSCLrfOwGI0n1Rnik7R4Xs7kIY5xyMFXLu4J5_EMs_xHLLK6WU79m1SnUbSqw4d5ylUqE2zSwFt3BvVnM5qM6xVneDUTp_t5IreTbOhz9QRzHcQTY3ucvueWpW5644cobZe00xmLsTognakhJsT0MNyxzMJ7VyqwFfq_4O56emClU5AaMr-nUKP2pTAtV12iP8Qc7As4gXwIAAA==

Logs

System Info

n/a

Severity

annoyance

@paoloricciuti
Copy link
Member

I marked it as an issue but i just realised you had an old version in the playground...this is already solved in the latest version, thanks for reporting! 😄

@paoloricciuti paoloricciuti closed this as not planned Won't fix, can't repro, duplicate, stale Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants