You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been ripping hairs out left and right for the last days while trying to figure out why I got the following error: switch_value is not a constructor.
This error apparently occurs when you pass an invalid value to the this="" attribute on <svelte:component /> inside a { #each } block.
My project is pretty large with some components having excessive amounts of binded properties. I thought these were to blame at first, but no, it was the stupid dynamic component that wasn't loaded in correctly.
Describe the problem
I've been ripping hairs out left and right for the last days while trying to figure out why I got the following error:
switch_value is not a constructor.
This error apparently occurs when you pass an invalid value to the
this=""
attribute on<svelte:component />
inside a{ #each }
block.My project is pretty large with some components having excessive amounts of binded properties. I thought these were to blame at first, but no, it was the stupid dynamic component that wasn't loaded in correctly.
Here is a recreation of the error using the REPL: https://svelte.dev/repl/904c3f254d9b45eaa96cc1b937b52130?version=3.48.0
Describe the proposed solution
Improve the error message
Alternatives considered
depending on if svelte can't catch the error and improve it, add a hint warning or something
Importance
would make my life easier
The text was updated successfully, but these errors were encountered: