Skip to content

Commit 0a433d9

Browse files
committed
tweak
1 parent 91458a0 commit 0a433d9

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

packages/svelte/src/internal/client/error-handling.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,19 @@ export function handle_error(error) {
3737

3838
/**
3939
* @param {unknown} error
40-
* @param {Effect} effect
40+
* @param {Effect | null} effect
4141
*/
4242
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) {
43+
while (effect !== null) {
44+
if ((effect.f & BOUNDARY_EFFECT) !== 0) {
4845
try {
4946
// @ts-expect-error
50-
current.fn(error);
47+
effect.fn(error);
5148
return;
5249
} catch {}
5350
}
5451

55-
current = current.parent;
52+
effect = effect.parent;
5653
}
5754

5855
throw error;

0 commit comments

Comments
 (0)