Skip to content

Commit 0368635

Browse files
committed
remove code thatcan't be reached and would error if it could
1 parent 91272d7 commit 0368635

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

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

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { DERIVED, PROXY_PATH_SYMBOL, STATE_SYMBOL } from '#client/constants';
66
import { effect_tracking } from '../reactivity/effects.js';
77
import { active_reaction, captured_signals, set_captured_signals, untrack } from '../runtime.js';
88

9-
/** @type { any } */
9+
/** @type {{ reaction: Reaction | null, entries: Map<any, any> } | null} */
1010
export let tracing_expressions = null;
1111

1212
/**
@@ -94,6 +94,7 @@ function log_entry(signal, entry) {
9494
*/
9595
export function trace(label, fn) {
9696
var previously_tracing_expressions = tracing_expressions;
97+
9798
try {
9899
tracing_expressions = { entries: new Map(), reaction: active_reaction };
99100

@@ -122,18 +123,6 @@ export function trace(label, fn) {
122123
console.groupEnd();
123124
}
124125

125-
if (previously_tracing_expressions !== null && tracing_expressions !== null) {
126-
for (const [signal, entry] of tracing_expressions.entries) {
127-
var prev_entry = previously_tracing_expressions.get(signal);
128-
129-
if (prev_entry === undefined) {
130-
previously_tracing_expressions.set(signal, entry);
131-
} else {
132-
prev_entry.read.push(...entry.read);
133-
}
134-
}
135-
}
136-
137126
return value;
138127
} finally {
139128
tracing_expressions = previously_tracing_expressions;

0 commit comments

Comments
 (0)