-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Component Not Defined not working for buildin javascript objects #4070
Comments
|
@Conduitry I guess it's just adding a if (globals.has(name) && node.type != 'InlineComponent') return; |
@bwbroersma do you review svelte source code? |
@anlexN If you wonder how we found this bug: @neoel and I sat down on a project he started making slate-svelte (a svelte rich text editor). During the debugging of a rewrite step from React to Svelte we noticed something strange (I think I noticed the WTF is going on and he immediately said "haha, it's a bug", we forgot to if (globals.has(name) && !template_scope) return; which fixed my test case, but ❌ failed many others 😉, then wondered if it could be solved with the node parameter, so added a |
In 3.16.1 this now produces a warning - https://svelte.dev/repl/1ad764d626f54d60b4b03cef168d6b85?version=3.16.1 |
Describe the bug
Compiles and results in a runtime error of
string.$$ is undefined
: REPL.Math
,Map
,Set
,RexExp
, etc. (resulting in other errors)Instead of
<Random />
which would result in'Random' is not defined. Consider adding a <script> block with 'export let Random' to declare a prop (1:0)
Expected behavior
Check if
String
is a defined Svelte Component instead of defined in javascript.The text was updated successfully, but these errors were encountered: