Skip to content

Commit c2d92dd

Browse files
committed
tweaks
1 parent 3fa5a67 commit c2d92dd

File tree

1 file changed

+6
-5
lines changed
  • packages/svelte/src/internal/client/dom/blocks

1 file changed

+6
-5
lines changed

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,12 @@ export function boundary(node, boundary_fn, props) {
6767
return;
6868
}
6969

70+
var onerror = props.onerror;
71+
let failed_snippet = props.failed;
72+
7073
// If we have nothing to capture the error then rethrow the error
7174
// for another boundary to handle
72-
if (!props.onerror && !props.failed) {
75+
if (!onerror && !failed_snippet) {
7376
throw error;
7477
}
7578

@@ -84,12 +87,10 @@ export function boundary(node, boundary_fn, props) {
8487
});
8588
};
8689

87-
if (props.onerror) {
88-
props.onerror(error, reset);
90+
if (onerror) {
91+
onerror(error, reset);
8992
}
9093

91-
let failed_snippet = props.failed;
92-
9394
if (failed_snippet) {
9495
// Ensure we create the boundary branch after the catch event cycle finishes
9596
queue_micro_task(() => {

0 commit comments

Comments
 (0)