update comment — it _does_ feel slightly wrong, but no wronger than the rest of this cursed function

pull/16482/head
Rich Harris 1 month ago
parent 6c2f0f92b0
commit 82e431fb77

@ -461,7 +461,7 @@ export function flushSync(fn) {
if (queued_root_effects.length === 0) {
current_batch?.flush();
// TODO this feels wrong
// we need to check again, in case we just updated an `$effect.pending()`
if (queued_root_effects.length === 0) {
// this would be reset in `flush_effects()` but since we are early returning here,
// we need to reset it here as well in case the first time there's 0 queued root effects

Loading…
Cancel
Save