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
Describe the bug
Using a generator on the Svelte REPL gives an error: "Infinite loop detected". Nothing seems to freeze and the code works fine when I run it in my own repo. I'm not sure if the error message is incorrect or if Svelte does something with generators/iterators that I'm not aware of.
Logs
This is the log from the REPL linked in the next section
To Reproduce
Create a generator and call the next() method on it inside a button onclick function. Click the button a couple of times and you'll get the error message. Here is a basic example where I'm updating some simple state:
Describe the bug
Using a generator on the Svelte REPL gives an error: "Infinite loop detected". Nothing seems to freeze and the code works fine when I run it in my own repo. I'm not sure if the error message is incorrect or if Svelte does something with generators/iterators that I'm not aware of.
Logs

This is the log from the REPL linked in the next section
To Reproduce
Create a generator and call the
next()
method on it inside a button onclick function. Click the button a couple of times and you'll get the error message. Here is a basic example where I'm updating some simple state:https://svelte.dev/repl/6d6346405cbd4267b82c53aa0218f536?version=3.20.1
Expected behavior
There shouldn't be an infinite loop error
Information about your Svelte project:
Browser: Chrome 80
OS: Windows 10
Svelte version: 3.20.1 (current REPL version)
Severity
How severe an issue is this bug to you? Is this annoying, blocking some users, blocking an upgrade or blocking your usage of Svelte entirely?
Not severe at all as my code seems to work outside of the REPL. I'd mostly like to make sure I'm not doing something wrong :)
Thanks!
The text was updated successfully, but these errors were encountered: