File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
packages/svelte/src/internal/client/reactivity Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -62,26 +62,22 @@ export class Batch {
6262
6363 var current_values = new Map ( ) ;
6464
65+ for ( const [ source , current ] of this . #current) {
66+ current_values . set ( source , source . v ) ;
67+ source . v = current ;
68+ }
69+
6570 for ( const batch of batches ) {
6671 if ( batch === this ) continue ;
6772
6873 for ( const [ source , previous ] of batch . #previous) {
69- if ( ! this . #current . has ( source ) ) {
74+ if ( ! current_values . has ( source ) ) {
7075 current_values . set ( source , source . v ) ;
7176 source . v = previous ;
7277 }
7378 }
7479 }
7580
76- for ( const [ source , current ] of this . #current) {
77- current_values . set ( source , source . v ) ;
78-
79- // TODO this shouldn't be necessary, but tests fail otherwise,
80- // presumably because we need a try-finally somewhere, and the
81- // source wasn't correctly reverted after the previous batch
82- source . v = current ;
83- }
84-
8581 for ( const root of root_effects ) {
8682 process_effects ( this , root ) ;
8783 }
You can’t perform that action at this time.
0 commit comments