Prevent one error being handled multiple times

pull/6585/head
rster20002 5 years ago
parent c8736dd81f
commit e0568fd976

@ -121,7 +121,7 @@ export function handle_error(component, e, skip = false) {
bubble_error(component, e);
}
if (!skip) {
if (!skip && !e.unhandled) {
component.$$.on_error.forEach(handler => {
try {
handler(e);
@ -136,6 +136,7 @@ function bubble_error(component, e) {
if (component.$$.parent_component) {
handle_error(component.$$.parent_component, e, component.$$.in_slot);
} else {
e.unhandled = true; // TODO this is very gross
throw e;
}
}

Loading…
Cancel
Save