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
Note: I understand that unhighlight probably should not be in the loop scope in this simple example. Nonetheless, this should not throw a runtime error in my opinion.
Logs
App.svelte:20 Uncaught ReferenceError: $$invalidate is not defined
at HTMLButtonElement.constants_1 (eval at handle_message (about:srcdoc:21:8), <anonymous>:757:4)
at HTMLButtonElement.eval (eval at handle_message (about:srcdoc:21:8), <anonymous>:796:73)
The second (failing) function does not use the loop item variable. Probably that is why it is not treated the same?
System Info
REPL / Chrome & Firefox
Severity
annoyance
The text was updated successfully, but these errors were encountered:
molily
changed the title
Invalidating functions cannot be declared as @const ()
Invalidating functions cannot be declared as @const (continutation)
Sep 5, 2023
molily
changed the title
Invalidating functions cannot be declared as @const (continutation)
Invalidating functions cannot be declared as @const (continuation)
Sep 5, 2023
Describe the bug
I believe this is a continuation of #7843.
The problem seems to be fixed for the original case but it still appears in 4.2.0 when there is a function that does not use the loop variable.
Thanks a lot for looking into this!
Reproduction
https://svelte.dev/repl/d573469069254061b887fb45cc3f0d18?version=4.2.0
Note: I understand that
unhighlight
probably should not be in the loop scope in this simple example. Nonetheless, this should not throw a runtime error in my opinion.Logs
here:
For comparison, the first function is hoisted to
instance
and passed through the ctx:Call site:
The second (failing) function does not use the loop item variable. Probably that is why it is not treated the same?
System Info
REPL / Chrome & Firefox
Severity
annoyance
The text was updated successfully, but these errors were encountered: