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

if blocks inside slotted content need wrapping with another element #826

Closed
ekhaled opened this issue Sep 7, 2017 · 4 comments
Closed

Comments

@ekhaled
Copy link
Contributor

ekhaled commented Sep 7, 2017

https://svelte.technology/repl?version=1.34.0&gist=5e64b44fa6b8eb3b13f83c5c1820e8ef

if you wrap the if block with a div, it works as expected.

Don't know how much of an overlap this is with #822

Please feel free to close if it's a duplicate

@ekhaled
Copy link
Contributor Author

ekhaled commented Sep 7, 2017

in dev mode you get this warning:

Uncaught DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.
    at insertNode 

where insertNode is from shared.js

@Rich-Harris
Copy link
Member

This is fixed in 1.39.1 — thanks!

@ekhaled
Copy link
Contributor Author

ekhaled commented Sep 12, 2017

So I did an npm update and I can confirm I have v1.39.1
yet, the problem is still there.

I understand the REPL has v1.34.0, maybe when the REPL is updated I can check again.

EDIT: well, the warning in the console is gone, but it still behaves exactly as it does on the current REPL

@Rich-Harris
Copy link
Member

Just update the version in the REPL url:

https://svelte.technology/repl?version=1.39.1&gist=5e64b44fa6b8eb3b13f83c5c1820e8ef

sacrosanctic pushed a commit to sacrosanctic/svelte that referenced this issue Dec 24, 2024
sync svelte docs

Co-authored-by: Rich-Harris <1162160+Rich-Harris@users.noreply.github.com>
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