Skip to content
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

Svelte 5.1.5: bind:this breaks with #snippet #14068

Closed
Razunter opened this issue Oct 31, 2024 · 2 comments · Fixed by #14074
Closed

Svelte 5.1.5: bind:this breaks with #snippet #14068

Razunter opened this issue Oct 31, 2024 · 2 comments · Fixed by #14074
Assignees

Comments

@Razunter
Copy link

Razunter commented Oct 31, 2024

Describe the bug

bind:this={variable} breaks when element contains #snippet inside. The bug was introduced in v5.1.5.

<form bind:this={thisBug}>
{#snippet Bug()}
{/snippet}
</form>

Reproduction

https://stackblitz.com/edit/vitejs-vite-ot6c27?file=src%2FApp.svelte

Logs

No response

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700KF
    Memory: 10.53 GB / 15.55 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 23.0.0 - ~/.volta/tools/image/node/23.0.0/bin/node
    npm: 10.9.0 - ~/.volta/tools/image/node/23.0.0/bin/npm
    pnpm: 9.12.2 - ~/.volta/bin/pnpm
    bun: 1.1.33 - ~/.bun/bin/bun
  npmPackages:
    rollup: ^4.24.3 => 4.24.3
    svelte: ^5.1.6 => 5.1.6

Severity

blocking an upgrade

@paoloricciuti
Copy link
Member

Here's a simpler reproduction

repl

The bind_this code is for some reason not generated. Will fix this evening

@paoloricciuti paoloricciuti self-assigned this Oct 31, 2024
@trueadm
Copy link
Contributor

trueadm commented Oct 31, 2024

Ah this was caused by #14038, I think I know where too

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

Successfully merging a pull request may close this issue.

3 participants