Skip to content

Commit 8e74719

Browse files
committed
tweak comments
1 parent 69877ae commit 8e74719

File tree

1 file changed

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

1 file changed

+3
-6
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,12 @@ export function boundary(node, props, boundary_fn) {
6969
var onerror = props.onerror;
7070
let failed = props.failed;
7171

72-
// If we have nothing to capture the error then re-throw the error
73-
// for another boundary to handle, additionaly, if we're creating
74-
// the fallback and that too fails, then re-throw the error
72+
// If we have nothing to capture the error, or if we hit an error while
73+
// rendering the fallback, re-throw for another boundary to handle
7574
if ((!onerror && !failed) || is_creating_fallback) {
7675
throw error;
7776
}
7877

79-
// Handle resetting the error boundary
8078
var reset = () => {
8179
if (boundary_effect) {
8280
pause_effect(boundary_effect);
@@ -100,9 +98,8 @@ export function boundary(node, props, boundary_fn) {
10098
set_hydrate_node(remove_nodes());
10199
}
102100

103-
// Handle the `failed` snippet fallback
104101
if (failed) {
105-
// Ensure we create the boundary branch after the catch event cycle finishes
102+
// Render the `failed` snippet in a microtask
106103
queue_micro_task(() => {
107104
with_boundary(boundary, () => {
108105
boundary_effect = null;

0 commit comments

Comments
 (0)