Skip to content

Commit 264f129

Browse files
committed
simplify
1 parent a4bd59a commit 264f129

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,13 +1350,7 @@ export function mutable_source(initial_value) {
13501350
// bind the signal to the component context, in case we need to
13511351
// track updates to trigger beforeUpdate/afterUpdate callbacks
13521352
if (current_component_context) {
1353-
const signals = current_component_context.d;
1354-
1355-
if (signals) {
1356-
signals.push(s);
1357-
} else {
1358-
current_component_context.d = [s];
1359-
}
1353+
(current_component_context.d ?? []).push(s);
13601354
}
13611355

13621356
return s;

0 commit comments

Comments
 (0)