Svelte

[bug] Bad rendering using await in component

#17033

Development PRs

Issue

Solved
A
adiguba
Oct 25, 2025, 6:52 AM

Describe the bug

Hi,

When testing await in the script tag of a component, I found a bug that I can't understand. I don't know if this is really a bug or if I'm doing something wrong.

I'm simply using an await to simulate an async load in my components, which I display via an {#each} on my main component, with an "add one value" button to add an element.

  • there is no problem if I add the elements one by one, waiting for them to load
  • but if I click the button multiple times, the rendering may be broken :
    • On a non-keyed {#each}, some component are not correctly rendered (no children), and others are missing
    • On a keyed {#each}, there are even more missing components!

Exemple (there should be 10 numbered circles on each line) : Image

Reproduction

Reproduction : https://svelte.dev/playground/c7e416c4b97446468ee85f3abf4bc676?version=5.41.4

Logs

No error

System Info

REPL with Svelte 5.41.4

Severity

annoyance

👍 2❤️ 1👀 1

Info

Closed at Nov 16, 2025, 5:35 PM
Assignees dummdidumm
Labels None
Milestone None

Pro tip: You can prefix GitHub URLs of issues, PRs or discussions with svcl.dev/ to view them on this page! Also try it on a GitHub release ;)