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
Description
typing out setInterval function calls will result in the console being flooded with error messages, largely because there is no milliseconds passed yet and the variables being used still haven't been fully typed. The setInterval function call it self is valid so the compiler will compile and re render the result.
Logs
Error: s is not defined
Error: se is not defined
Error: sec is not defined
Error: second is not defined
Error sec is not defined
...
To Reproduce
On the editor, type a setInterval call slowly and must have an ending parentheses i.e setInterval().
NOTE: type the setInterval call inside the App.svelte script tag. I'm sure this is also the case with other tutorials using
setInterval() inside the script tag.
You will notice that if it compiles while you haven't finished typing it all out, the console is being flooded.
The problem will persist even when recompiling the code.
Expected behavior
The console shouldn't be printing any more errors when the answer is working.
Severity
VERY MINOR - just a problem with logging errors in the tutorial, people will get confused if they encounter this though.
The text was updated successfully, but these errors were encountered:
Transferring this to the REPL repository, although I'm not sure what we could reasonably do to resolve this. Maybe monkeypatch/inject our own copies of setTimeout/setInterval that internally note somewhere the timeout/interval id so that we can manually destroy them when recompiling?
Description
typing out setInterval function calls will result in the console being flooded with error messages, largely because there is no milliseconds passed yet and the variables being used still haven't been fully typed. The setInterval function call it self is valid so the compiler will compile and re render the result.
Logs
Error: s is not defined
Error: se is not defined
Error: sec is not defined
Error: second is not defined
Error sec is not defined
...
To Reproduce
On the editor, type a setInterval call slowly and must have an ending parentheses i.e setInterval().
NOTE: type the setInterval call inside the App.svelte script tag. I'm sure this is also the case with other tutorials using
setInterval() inside the script tag.
You will notice that if it compiles while you haven't finished typing it all out, the console is being flooded.
The problem will persist even when recompiling the code.
Expected behavior
The console shouldn't be printing any more errors when the answer is working.
Severity
VERY MINOR - just a problem with logging errors in the tutorial, people will get confused if they encounter this though.
The text was updated successfully, but these errors were encountered: