Skip to content

Commit a405d47

Browse files
committed
remove unnecessary TEMPLATE_EFFECT distinction
1 parent 5f61b08 commit a405d47

File tree

4 files changed

+4
-13
lines changed

4 files changed

+4
-13
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ export const BLOCK_EFFECT = 1 << 4;
55
export const BRANCH_EFFECT = 1 << 5;
66
export const ROOT_EFFECT = 1 << 6;
77
export const BOUNDARY_EFFECT = 1 << 7;
8-
export const TEMPLATE_EFFECT = 1 << 8;
98
export const UNOWNED = 1 << 9;
109
export const DISCONNECTED = 1 << 10;
1110
export const CLEAN = 1 << 11;

packages/svelte/src/internal/client/dev/debug.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import {
99
EFFECT,
1010
MAYBE_DIRTY,
1111
RENDER_EFFECT,
12-
ROOT_EFFECT,
13-
TEMPLATE_EFFECT
12+
ROOT_EFFECT
1413
} from '../constants.js';
1514

1615
/**
@@ -38,8 +37,6 @@ export function log_effect_tree(effect) {
3837
label = 'root';
3938
} else if ((flags & BOUNDARY_EFFECT) !== 0) {
4039
label = 'boundary';
41-
} else if ((flags & TEMPLATE_EFFECT) !== 0) {
42-
label = 'template';
4340
} else if ((flags & BLOCK_EFFECT) !== 0) {
4441
label = 'block';
4542
} else if ((flags & BRANCH_EFFECT) !== 0) {

packages/svelte/src/internal/client/reactivity/effects.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ import {
3535
HEAD_EFFECT,
3636
MAYBE_DIRTY,
3737
EFFECT_HAS_DERIVED,
38-
BOUNDARY_EFFECT,
39-
TEMPLATE_EFFECT
38+
BOUNDARY_EFFECT
4039
} from '../constants.js';
4140
import { set } from './sources.js';
4241
import * as e from '../errors.js';
@@ -388,7 +387,7 @@ function create_template_effect(fn, deriveds) {
388387
});
389388
}
390389

391-
create_effect(RENDER_EFFECT | TEMPLATE_EFFECT, effect, true);
390+
create_effect(RENDER_EFFECT, effect, true);
392391
}
393392

394393
/**

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import {
2525
DISCONNECTED,
2626
BOUNDARY_EFFECT,
2727
REACTION_IS_UPDATING,
28-
TEMPLATE_EFFECT,
2928
BOUNDARY_SUSPENDED
3029
} from './constants.js';
3130
import {
@@ -823,10 +822,7 @@ function process_effects(effect, collected_effects, boundary) {
823822

824823
if (!is_skippable_branch && (flags & INERT) === 0) {
825824
// Inside a boundary, defer everything except block/branch effects
826-
var defer =
827-
boundary !== undefined &&
828-
!is_branch &&
829-
((flags & BLOCK_EFFECT) === 0 || (flags & TEMPLATE_EFFECT) !== 0);
825+
var defer = boundary !== undefined && !is_branch && (flags & BLOCK_EFFECT) === 0;
830826

831827
if (defer) {
832828
add_boundary_effect(/** @type {Effect} */ (boundary), current_effect);

0 commit comments

Comments
 (0)