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

Default slot conditional error #850

Closed
mrkishi opened this issue Sep 16, 2017 · 1 comment · Fixed by #851
Closed

Default slot conditional error #850

mrkishi opened this issue Sep 16, 2017 · 1 comment · Fixed by #851

Comments

@mrkishi
Copy link
Member

mrkishi commented Sep 16, 2017

This is possibly related to #849.

When using a default slot, you have to either wrap conditionals with other tags or have them be the only content inside the component.

This fails:
https://svelte.technology/repl?version=1.39.2&gist=f30b005debb0daa771e7c612622c1344

But this works:
https://svelte.technology/repl?version=1.39.2&gist=91607f88a95c234ba4bd9cde6947531a

And so does this:
https://svelte.technology/repl?version=1.39.2&gist=0dd35c3da30ef0687d6e553b47537e2e

Rich-Harris added a commit that referenced this issue Sep 16, 2017
Rich-Harris added a commit that referenced this issue Sep 16, 2017
use anchor.parentNode as target instead of slot document fragment
@Rich-Harris
Copy link
Member

Thanks — fixed in 1.39.3

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.

2 participants