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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy