-
-
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
ReferenceError: data is not defined #2943
Comments
Is this the same as #2942 or is it a separate issue? |
I think in my case |
In reference to #2942 , this may indeed be corollary issues. It appears as though some form of scope is locked into the included components. |
I see now, The issue is with the lack of binding the let: variable. If you bind the let:variable to a locally defined variable there is no error. |
Any new on this? |
I came across this in the current version. When this is resolved it would be possible to use components of a library in a more convenient way as you would not have to bind to a variable. |
Fixes #2943 The issue linked above invalidates a variable that is not defined in <script> but instead is defined as a let: variable, which does not make sense to invalidate, therefore, this PR exists.
Using
let:data
from a custom component, and then usingdata
inside a loop along with<select bind:value={anything}>
tries to wipe-outdata
too!See the example on the REPL: https://svelte.dev/repl/a05cc3a759f341479b56a944d60d4b20?version=3.4.4
Invalidation calls are:
The text was updated successfully, but these errors were encountered: