Skip to content

Commit 6e1a331

Browse files
committed
tidy up
1 parent 0ace243 commit 6e1a331

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,13 @@ import {
3030
import { get_next_sibling } from '../operations.js';
3131
import { queue_boundary_micro_task } from '../task.js';
3232
import * as e from '../../../shared/errors.js';
33-
import { run_all } from '../../../shared/utils.js';
3433

3534
const ASYNC_INCREMENT = Symbol();
3635
const ASYNC_DECREMENT = Symbol();
3736
const ADD_CALLBACK = Symbol();
3837
const ADD_RENDER_EFFECT = Symbol();
3938
const ADD_EFFECT = Symbol();
40-
const RELEASE = Symbol();
39+
const COMMIT = Symbol();
4140

4241
/**
4342
* @param {Effect} boundary
@@ -219,7 +218,7 @@ export function boundary(node, props, children) {
219218
return;
220219
}
221220

222-
if (input === RELEASE) {
221+
if (input === COMMIT) {
223222
unsuspend();
224223
return;
225224
}
@@ -445,7 +444,7 @@ export function add_boundary_effect(boundary, effect) {
445444
/**
446445
* @param {Effect} boundary
447446
*/
448-
export function release_boundary(boundary) {
447+
export function commit_boundary(boundary) {
449448
// @ts-ignore
450-
boundary.fn?.(RELEASE);
449+
boundary.fn?.(COMMIT);
451450
}

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import {
5252
set_component_context,
5353
set_dev_current_component_function
5454
} from './context.js';
55-
import { add_boundary_effect, release_boundary } from './dom/blocks/boundary.js';
55+
import { add_boundary_effect, commit_boundary } from './dom/blocks/boundary.js';
5656

5757
const FLUSH_MICROTASK = 0;
5858
const FLUSH_SYNC = 1;
@@ -825,7 +825,7 @@ function process_effects(effect, collected_effects, boundary) {
825825
// Inside a boundary, defer everything except block/branch effects
826826
var defer =
827827
boundary !== undefined &&
828-
(flags & BRANCH_EFFECT) === 0 &&
828+
!is_branch &&
829829
((flags & BLOCK_EFFECT) === 0 || (flags & TEMPLATE_EFFECT) !== 0);
830830

831831
if (defer) {
@@ -835,12 +835,10 @@ function process_effects(effect, collected_effects, boundary) {
835835

836836
if ((current_effect.f & BOUNDARY_SUSPENDED) === 0) {
837837
// no more async work to happen
838-
release_boundary(current_effect);
838+
commit_boundary(current_effect);
839839
}
840840
} else if ((flags & RENDER_EFFECT) !== 0) {
841-
if ((flags & BOUNDARY_EFFECT) !== 0) {
842-
// TODO do we need to do anything here?
843-
} else if (is_branch) {
841+
if (is_branch) {
844842
current_effect.f ^= CLEAN;
845843
} else {
846844
// Ensure we set the effect to be the active reaction

0 commit comments

Comments
 (0)