File tree Expand file tree Collapse file tree 2 files changed +7
-18
lines changed
packages/svelte/src/internal/client Expand file tree Collapse file tree 2 files changed +7
-18
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " svelte " : patch
3+ ---
4+
5+ chore: cleanup derived destruction
Original file line number Diff line number Diff line change @@ -494,14 +494,7 @@ function destroy_references(signal) {
494494 if ( references !== null ) {
495495 let i ;
496496 for ( i = 0 ; i < references . length ; i ++ ) {
497- const reference = references [ i ] ;
498- if ( ( reference . f & IS_EFFECT ) !== 0 ) {
499- destroy_signal ( reference ) ;
500- } else {
501- destroy_references ( reference ) ;
502- remove_consumers ( reference , 0 ) ;
503- reference . d = null ;
504- }
497+ destroy_signal ( references [ i ] ) ;
505498 }
506499 }
507500}
@@ -1268,16 +1261,7 @@ export function destroy_signal(signal) {
12681261 const flags = signal . f ;
12691262 destroy_references ( signal ) ;
12701263 remove_consumers ( signal , 0 ) ;
1271- signal . i =
1272- signal . r =
1273- signal . y =
1274- signal . x =
1275- signal . b =
1276- // @ts -expect-error - this is fine, since we're assigning to null to clear out a destroyed signal
1277- signal . v =
1278- signal . d =
1279- signal . c =
1280- null ;
1264+ signal . i = signal . r = signal . y = signal . x = signal . b = signal . d = signal . c = null ;
12811265 set_signal_status ( signal , DESTROYED ) ;
12821266 if ( destroy !== null ) {
12831267 if ( is_array ( destroy ) ) {
You can’t perform that action at this time.
0 commit comments