Skip to content

Commit c3361bf

Browse files
authored
chore: remove component_context.d (#16330)
1 parent 86b06cb commit c3361bf

File tree

3 files changed

+2
-17
lines changed

3 files changed

+2
-17
lines changed

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,16 +139,15 @@ export function getAllContexts() {
139139
* @returns {void}
140140
*/
141141
export function push(props, runes = false, fn) {
142-
var ctx = (component_context = {
142+
component_context = {
143143
p: component_context,
144144
c: null,
145-
d: false,
146145
e: null,
147146
m: false,
148147
s: props,
149148
x: null,
150149
l: null
151-
});
150+
};
152151

153152
if (legacy_mode_flag && !runes) {
154153
component_context.l = {
@@ -159,10 +158,6 @@ export function push(props, runes = false, fn) {
159158
};
160159
}
161160

162-
teardown(() => {
163-
/** @type {ComponentContext} */ (ctx).d = true;
164-
});
165-
166161
if (DEV) {
167162
// component function
168163
component_context.function = fn;

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -268,14 +268,6 @@ export function spread_props(...props) {
268268
return new Proxy({ props }, spread_props_handler);
269269
}
270270

271-
/**
272-
* @param {Derived} current_value
273-
* @returns {boolean}
274-
*/
275-
function has_destroyed_component_ctx(current_value) {
276-
return current_value.ctx?.d ?? false;
277-
}
278-
279271
/**
280272
* This function is responsible for synchronizing a possibly bound prop with the inner component state.
281273
* It is used whenever the compiler sees that the component writes to the prop, or when it has a default prop_value.

packages/svelte/src/internal/client/types.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ export type ComponentContext = {
1414
p: null | ComponentContext;
1515
/** context */
1616
c: null | Map<unknown, unknown>;
17-
/** destroyed */
18-
d: boolean;
1917
/** deferred effects */
2018
e: null | Array<{
2119
fn: () => void | (() => void);

0 commit comments

Comments
 (0)