@@ -33,7 +33,7 @@ export function add_flush_callback(fn) {
33
33
34
34
let flushing = false ;
35
35
const seen_callbacks = new Set ( ) ;
36
- let dirty_binding_component_map = new Map ( ) ;
36
+ let previous_dirty_components = [ ] ;
37
37
38
38
export function flush ( ) {
39
39
if ( flushing ) return ;
@@ -45,19 +45,18 @@ export function flush() {
45
45
for ( let i = 0 ; i < dirty_components . length ; i += 1 ) {
46
46
const component = dirty_components [ i ] ;
47
47
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 ;
49
49
update ( component . $$ , is_dirty_from_binding ) ;
50
50
}
51
- dirty_binding_component_map = new Map ( ) ;
51
+ previous_dirty_components = [ ] ;
52
52
set_current_component ( null ) ;
53
53
54
54
dirty_components . length = 0 ;
55
55
56
56
while ( binding_callbacks . length ) {
57
57
binding_callbacks . pop ( ) ( ) ;
58
58
}
59
- dirty_components . forEach ( ( i ) =>
60
- dirty_binding_component_map . set ( i . constructor . name , i ) ) ;
59
+ previous_dirty_components = [ ...dirty_components ]
61
60
// then, once components are updated, call
62
61
// afterUpdate functions. This may cause
63
62
// subsequent updates...
0 commit comments