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

Slots with dynamic component aren't working #4597

Closed
elbourki opened this issue Mar 25, 2020 · 1 comment · Fixed by #4598
Closed

Slots with dynamic component aren't working #4597

elbourki opened this issue Mar 25, 2020 · 1 comment · Fixed by #4598
Assignees

Comments

@elbourki
Copy link

Describe the bug
This was working perfectly fine in the previous versions of svelte, it stopped working when I upgraded Svelte from 3.19.2 to 3.20.1.
I'm not sure what causes the issue but it happens if you have a slot wrapped in a div, and used <svelte:component/> as a fallback. Removing the div or replacing <svelte:component/> works just fine.

Logs
Uncaught (in promise): div is not defined

To Reproduce
https://svelte.dev/repl/41a85b6cd92f4e1fb4773b90eb5c97ca

Expected behavior
Show the other component

Stacktraces

Stack trace
Component.svelte:46 Uncaught (in promise) ReferenceError: div is not defined
at Object.update [as p] (Component.svelte:46)
at Object.update [as p] (Component.svelte:44)
at update (index.mjs:687)
at flush (index.mjs:656)

Information about your Svelte project:

  • Your browser and the version: Chrome 80

  • Your operating system: Windows 10

  • Svelte version: 3.20.1

  • Whether your project uses Webpack or Rollup; Webpack

Severity
Honestly, this blocks my usage of Svelte, I thought this component was finished but when it suddenly stopped working I had to dig in the changes I have made for a few hours before finding out it was an issue with Svelte itself. And the component is a pretty big deal in my project.

@Conduitry
Copy link
Member

Fixed in 3.21.0 - https://svelte.dev/repl/41a85b6cd92f4e1fb4773b90eb5c97ca?version=3.21.0

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