pull/16197/head
Rich Harris 4 months ago
parent 00ba548d94
commit cd24e51bc8

@ -130,17 +130,11 @@ export function async_derived(fn, location) {
prev = promise; prev = promise;
var restore = capture();
var batch = /** @type {Batch} */ (current_batch); var batch = /** @type {Batch} */ (current_batch);
var ran = boundary.ran; var ran = boundary.ran;
if (should_suspend) { if (should_suspend) {
if (!ran) { (ran ? batch : boundary).increment();
boundary.increment();
} else {
batch.increment();
}
} }
/** /**
@ -154,15 +148,10 @@ export function async_derived(fn, location) {
return; return;
} }
restore();
from_async_derived = null; from_async_derived = null;
if (should_suspend) { if (should_suspend) {
if (!ran) { (ran ? batch : boundary).decrement();
boundary.decrement();
} else {
batch.decrement();
}
} }
if (ran) batch.restore(); if (ran) batch.restore();

Loading…
Cancel
Save