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

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

Loading…
Cancel
Save