@@ -33,7 +33,7 @@ export function add_flush_callback(fn) {
3333
3434let flushing = false ;
3535const seen_callbacks = new Set ( ) ;
36- let dirty_binding_component_map = new Map ( ) ;
36+ let previous_dirty_components = [ ] ;
3737
3838export function flush ( ) {
3939 if ( flushing ) return ;
@@ -45,19 +45,18 @@ export function flush() {
4545 for ( let i = 0 ; i < dirty_components . length ; i += 1 ) {
4646 const component = dirty_components [ i ] ;
4747 set_current_component ( component ) ;
48- const is_dirty_from_binding = dirty_binding_component_map . has ( component . constructor . name ) ;
48+ const is_dirty_from_binding = previous_dirty_components . indexOf ( component ) > - 1 ;
4949 update ( component . $$ , is_dirty_from_binding ) ;
5050 }
51- dirty_binding_component_map = new Map ( ) ;
51+ previous_dirty_components = [ ] ;
5252 set_current_component ( null ) ;
5353
5454 dirty_components . length = 0 ;
5555
5656 while ( binding_callbacks . length ) {
5757 binding_callbacks . pop ( ) ( ) ;
5858 }
59- dirty_components . forEach ( ( i ) =>
60- dirty_binding_component_map . set ( i . constructor . name , i ) ) ;
59+ previous_dirty_components = [ ...dirty_components ]
6160 // then, once components are updated, call
6261 // afterUpdate functions. This may cause
6362 // subsequent updates...
0 commit comments