Skip to content

Commit 08d5799

Browse files
committed
retry -> reset
1 parent b624b24 commit 08d5799

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/svelte/elements.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2027,7 +2027,7 @@ export interface SvelteHTMLElements {
20272027
};
20282028
'svelte:head': { [name: string]: any };
20292029
'svelte:boundary': {
2030-
onerror?: (error: Error, retry: () => void) => void;
2030+
onerror?: (error: Error, reset: () => void) => void;
20312031
};
20322032

20332033
[name: string]: { [name: string]: any };

packages/svelte/src/internal/client/dom/blocks/boundary.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ function with_boundary(boundary, fn) {
4343
/**
4444
* @param {TemplateNode} node
4545
* @param {((anchor: Node) => void)} boundary_fn
46-
* @param {(anchor: Node, error: () => Error, retry: () => () => void) => void | null} failed
47-
* @param {(error: Error, retry: () => void) => void | null} onerror
46+
* @param {(anchor: Node, error: () => Error, reset: () => () => void) => void | null} failed
47+
* @param {(error: Error, reset: () => void) => void | null} onerror
4848
* @returns {void}
4949
*/
5050
export function boundary(node, boundary_fn, failed, onerror) {
@@ -71,8 +71,8 @@ export function boundary(node, boundary_fn, failed, onerror) {
7171
throw error;
7272
}
7373

74-
// Handle retrying the error boundary
75-
var retry = () => {
74+
// Handle resetting the error boundary
75+
var reset = () => {
7676
if (boundary_effect) {
7777
pause_effect(boundary_effect);
7878
}
@@ -83,7 +83,7 @@ export function boundary(node, boundary_fn, failed, onerror) {
8383
};
8484

8585
if (onerror) {
86-
onerror(error, retry);
86+
onerror(error, reset);
8787
}
8888

8989
if (failed) {
@@ -95,7 +95,7 @@ export function boundary(node, boundary_fn, failed, onerror) {
9595
failed(
9696
anchor,
9797
() => error,
98-
() => retry
98+
() => reset
9999
)
100100
);
101101
});

0 commit comments

Comments
 (0)