Skip to content

Commit a2cbfe2

Browse files
committed
block only runs once, put vars inside
1 parent a0c8e71 commit a2cbfe2

File tree

1 file changed

+10
-8
lines changed
  • packages/svelte/src/internal/client/dom/blocks

1 file changed

+10
-8
lines changed

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

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,17 @@ function with_boundary(boundary, fn) {
6868
export function boundary(node, props, boundary_fn) {
6969
var anchor = node;
7070

71-
/** @type {Effect} */
72-
var boundary_effect;
73-
/** @type {Effect | null} */
74-
var async_effect = null;
75-
/** @type {DocumentFragment | null} */
76-
var async_fragment = null;
77-
var async_count = 0;
78-
7971
block(() => {
72+
/** @type {Effect} */
73+
var boundary_effect;
74+
75+
/** @type {Effect | null} */
76+
var async_effect = null;
77+
78+
/** @type {DocumentFragment | null} */
79+
var async_fragment = null;
80+
81+
var async_count = 0;
8082
var boundary = /** @type {Effect} */ (active_effect);
8183
var hydrate_open = hydrate_node;
8284
var is_creating_fallback = false;

0 commit comments

Comments
 (0)