We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91458a0 commit 0a433d9Copy full SHA for 0a433d9
packages/svelte/src/internal/client/error-handling.js
@@ -37,22 +37,19 @@ export function handle_error(error) {
37
38
/**
39
* @param {unknown} error
40
- * @param {Effect} effect
+ * @param {Effect | null} effect
41
*/
42
export function invoke_error_boundary(error, effect) {
43
- /** @type {Effect | null} */
44
- var current = effect;
45
-
46
- while (current !== null) {
47
- if ((current.f & BOUNDARY_EFFECT) !== 0) {
+ while (effect !== null) {
+ if ((effect.f & BOUNDARY_EFFECT) !== 0) {
48
try {
49
// @ts-expect-error
50
- current.fn(error);
+ effect.fn(error);
51
return;
52
} catch {}
53
}
54
55
- current = current.parent;
+ effect = effect.parent;
56
57
58
throw error;
0 commit comments