Skip to content

Commit 176ec0d

Browse files
committed
fix
1 parent 70fa103 commit 176ec0d

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** @import { Effect, TemplateNode } from '#client' */
22
import { FILENAME, HYDRATION_ERROR } from '../../../../constants.js';
3-
import { block, branch, destroy_effect, template_effect } from '../../reactivity/effects.js';
3+
import { branch, destroy_effect, template_effect } from '../../reactivity/effects.js';
44
import { hydrate_next, hydrate_node, hydrating, set_hydrate_node } from '../hydration.js';
55
import { create_fragment_from_html } from '../reconciler.js';
66
import { assign_nodes } from '../template.js';
@@ -9,8 +9,6 @@ import { hash, sanitize_location } from '../../../../utils.js';
99
import { DEV } from 'esm-env';
1010
import { dev_current_component_function } from '../../context.js';
1111
import { get_first_child, get_next_sibling } from '../operations.js';
12-
import { active_effect, suspended } from '../../runtime.js';
13-
import { add_boundary_callback, find_boundary } from './boundary.js';
1412

1513
/**
1614
* @param {Element} element

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
} from '../hydration.js';
1111
import { block, branch, pause_effect, resume_effect } from '../../reactivity/effects.js';
1212
import { HYDRATION_START_ELSE, UNINITIALIZED } from '../../../../constants.js';
13-
import { active_effect, suspended } from '../../runtime.js';
13+
import { active_effect } from '../../runtime.js';
1414
import { add_boundary_callback, find_boundary } from './boundary.js';
1515
import { should_defer_append } from '../operations.js';
1616

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
import { UNINITIALIZED } from '../../../../constants.js';
33
import { block, branch, pause_effect } from '../../reactivity/effects.js';
44
import { not_equal, safe_not_equal } from '../../reactivity/equality.js';
5-
import { active_effect, suspended } from '../../runtime.js';
5+
import { active_effect } from '../../runtime.js';
66
import { is_runes } from '../../context.js';
77
import { hydrate_next, hydrate_node, hydrating } from '../hydration.js';
88
import { add_boundary_callback, find_boundary } from './boundary.js';
9+
import { should_defer_append } from '../operations.js';
910

1011
/**
1112
* @template V
@@ -57,14 +58,16 @@ export function key_block(node, get_key, render_fn) {
5758
if (changed(key, (key = get_key()))) {
5859
var target = anchor;
5960

60-
if (suspended) {
61+
var defer = boundary !== null && should_defer_append();
62+
63+
if (defer) {
6164
offscreen_fragment = document.createDocumentFragment();
6265
offscreen_fragment.append((target = document.createComment('')));
6366
}
6467

6568
pending_effect = branch(() => render_fn(target));
6669

67-
if (suspended) {
70+
if (defer) {
6871
add_boundary_callback(boundary, commit);
6972
} else {
7073
commit();

packages/svelte/src/internal/client/runtime.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ export let active_reaction = null;
9797

9898
export let untracking = false;
9999

100-
export let suspended = false;
101-
102100
/** @param {null | Reaction} reaction */
103101
export function set_active_reaction(reaction) {
104102
active_reaction = reaction;

0 commit comments

Comments
 (0)