pull/16091/head
Rich Harris 4 months ago
parent e243091d46
commit 91458a012d

@ -20,13 +20,18 @@ export function handle_error(error) {
adjust_error(error, effect); adjust_error(error, effect);
} }
if ((effect.f & EFFECT_RAN) !== 0) { if ((effect.f & EFFECT_RAN) === 0) {
invoke_error_boundary(error, effect); // if the error occurred while creating this subtree, we let it
} else if ((effect.f & BOUNDARY_EFFECT) !== 0) { // bubble up until it hits a boundary that can handle it
// invoke directly if ((effect.f & BOUNDARY_EFFECT) === 0) {
throw error;
}
// @ts-expect-error
effect.fn(error); effect.fn(error);
} else { } else {
throw error; // otherwise we bubble up the effect tree ourselves
invoke_error_boundary(error, effect);
} }
} }

Loading…
Cancel
Save