-
-
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
Fix update code being generated for module variable dependencies #5943
Labels
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
5 tasks
dummdidumm
pushed a commit
that referenced
this issue
Sep 20, 2023
kelvinsjk
pushed a commit
to kelvinsjk/svelte
that referenced
this issue
Oct 19, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As discussed in #5926 (comment), I'm already working on this and should hopefully have a PR up soon.
Svelte generates update code when a
class:
expression is dependent on a module variable but this shouldn't happen. The docs say:Test Case
https://svelte.dev/repl/ca93007e0e03454fbeda66bd6e2a6b9b?version=3.32.1
If you click the button, you'll see that
o
is not reactive (because it's a module var). But if you look at the JS output you'll see the component's update code isn't anoop
like it should be, instead it's:Cause
I'm pretty sure that this is because
is_dynamic
returnstrue
for the module var. I'm looking into whether changing that behavior will break anything though.The text was updated successfully, but these errors were encountered: