boundary_fn -> children

aa
Rich Harris 7 months ago
parent 1c4db3d341
commit 36e281c8c9

@ -62,10 +62,10 @@ function with_boundary(boundary, fn) {
* failed?: (anchor: Node, error: () => unknown, reset: () => () => void) => void * failed?: (anchor: Node, error: () => unknown, reset: () => () => void) => void
* pending?: (anchor: Node) => void * pending?: (anchor: Node) => void
* }} props * }} props
* @param {((anchor: Node) => void)} boundary_fn * @param {((anchor: Node) => void)} children
* @returns {void} * @returns {void}
*/ */
export function boundary(node, props, boundary_fn) { export function boundary(node, props, children) {
var anchor = node; var anchor = node;
block(() => { block(() => {
@ -161,7 +161,7 @@ export function boundary(node, props, boundary_fn) {
with_boundary(boundary, () => { with_boundary(boundary, () => {
is_creating_fallback = false; is_creating_fallback = false;
boundary_effect = branch(() => boundary_fn(anchor)); boundary_effect = branch(() => children(anchor));
reset_is_throwing_error(); reset_is_throwing_error();
}); });
} }
@ -241,11 +241,11 @@ export function boundary(node, props, boundary_fn) {
queueMicrotask(() => { queueMicrotask(() => {
destroy_effect(boundary_effect); destroy_effect(boundary_effect);
with_boundary(boundary, () => { with_boundary(boundary, () => {
boundary_effect = branch(() => boundary_fn(anchor)); boundary_effect = branch(() => children(anchor));
}); });
}); });
} else { } else {
boundary_effect = branch(() => boundary_fn(anchor)); boundary_effect = branch(() => children(anchor));
} }
reset_is_throwing_error(); reset_is_throwing_error();

Loading…
Cancel
Save