We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Infinite loop detected
REPL example
The code is roughly as follows:
<script> let pages = [] $: if (search.length > 0) { while (! allPagesLoaded) { pages = [...pages, await loadPage(previousPage)] } } </script>
Exact code
Since the loadPage function is slow to complete, the loop guard throws an exception, despite the loop not being infinite.
loadPage
The text was updated successfully, but these errors were encountered:
Moving this to the svelte repo as a feature request to update the loop guard feature ... somehow. Maybe disable it for loops inside async functions?
svelte
Sorry, something went wrong.
This should be fixed in 3.44.3 - https://svelte.dev/repl/cd92d7b053f04ce981ad9a3871cdc5cd?version=3.44.3
I'm not sure if the fix works in this case, the example still displays "Infinite loop detected"
Successfully merging a pull request may close this issue.
REPL example
The code is roughly as follows:
Exact code
Since the
loadPage
function is slow to complete, the loop guard throws an exception, despite the loop not being infinite.The text was updated successfully, but these errors were encountered: