Skip to content

Commit 82e431f

Browse files
committed
update comment — it _does_ feel slightly wrong, but no wronger than the rest of this cursed function
1 parent 6c2f0f9 commit 82e431f

File tree

1 file changed

+1
-1
lines changed
  • packages/svelte/src/internal/client/reactivity

1 file changed

+1
-1
lines changed

packages/svelte/src/internal/client/reactivity/batch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ export function flushSync(fn) {
461461
if (queued_root_effects.length === 0) {
462462
current_batch?.flush();
463463

464-
// TODO this feels wrong
464+
// we need to check again, in case we just updated an `$effect.pending()`
465465
if (queued_root_effects.length === 0) {
466466
// this would be reset in `flush_effects()` but since we are early returning here,
467467
// we need to reset it here as well in case the first time there's 0 queued root effects

0 commit comments

Comments
 (0)