Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/svelte/src/internal/client/reactivity/deriveds.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,13 @@ export function async_derived(fn, location) {
if (should_suspend) {
boundary.update_pending_count(-1);
if (!pending) batch.decrement();
} else {
// Ensure effects depending on this async derived run promptly when we didn't suspend
// and there is no pending boundary — commit queued work immediately.
if (!pending) {
batch.flush();
batch.deactivate();
}
}

unset_context();
Expand Down
Loading