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

IIFE in nested element does not work #14343

Open
devunt opened this issue Nov 18, 2024 · 0 comments · May be fixed by #14345
Open

IIFE in nested element does not work #14343

devunt opened this issue Nov 18, 2024 · 0 comments · May be fixed by #14345
Assignees
Labels

Comments

@devunt
Copy link

devunt commented Nov 18, 2024

Describe the bug

Calling IIFE inside of nested element does not work, as opposed to top level element.

<span class={(() => 'red')()}>span (red)</span>
^ get class="red" rendered

<div>
  <span class={(() => 'red')()}>div > span (red)</span>
  ^ span does not have class attribute
</div>

This worked in 5.1.17, but regressed in 5.2.0.

Reproduction

https://svelte.dev/playground/8d35c2574e7a4a3bbd15a7578623535c?version=5.2.0
https://svelte.dev/playground/8d35c2574e7a4a3bbd15a7578623535c?version=5.1.17

Logs

No response

System Info

Svelte Playground 5.2.0 (or 5.1.17)

Severity

blocking an upgrade

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants