pull/16197/head
Rich Harris 4 months ago
parent f8e4651b7c
commit fdb7a6dc85

@ -180,18 +180,21 @@ export function async_derived(fn, location) {
(e) => { (e) => {
prev = null; prev = null;
if (e === STALE_REACTION) { if (e !== STALE_REACTION) {
if (should_suspend) {
// TODO this feels asymmetrical though it seems to work?
if (!ran) {
boundary.decrement();
} else {
batch.remove();
}
}
} else {
handle_error(e, parent, null, parent.ctx); handle_error(e, parent, null, parent.ctx);
batch.remove(); }
if (should_suspend) {
if (!ran) {
boundary.decrement();
} else {
batch.decrement();
}
}
if (ran) {
batch.restore();
batch.flush();
} }
} }
); );

Loading…
Cancel
Save