File tree 2 files changed +3
-7
lines changed
2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,6 @@ export function get_current_component() {
11
11
return current_component ;
12
12
}
13
13
14
- export function maybe_get_current_component ( ) {
15
- return current_component ;
16
- }
17
-
18
14
export function beforeUpdate ( fn : ( ) => any ) {
19
15
get_current_component ( ) . $$ . before_update . push ( fn ) ;
20
16
}
Original file line number Diff line number Diff line change 1
1
import { run_all } from './utils' ;
2
- import { maybe_get_current_component , set_current_component } from './lifecycle' ;
2
+ import { current_component , set_current_component } from './lifecycle' ;
3
3
4
4
export const dirty_components = [ ] ;
5
5
export const intros = { enabled : false } ;
@@ -35,7 +35,7 @@ const seen_callbacks = new Set();
35
35
let flushidx = 0 ; // Do *not* move this inside the flush() function
36
36
export function flush ( ) {
37
37
38
- const current_component = maybe_get_current_component ( ) ;
38
+ const saved_component = current_component ;
39
39
40
40
do {
41
41
// first, call beforeUpdate functions
@@ -70,7 +70,7 @@ export function flush() {
70
70
render_callbacks . length = 0 ;
71
71
} while ( dirty_components . length ) ;
72
72
73
- set_current_component ( current_component ) ;
73
+ set_current_component ( saved_component ) ;
74
74
75
75
while ( flush_callbacks . length ) {
76
76
flush_callbacks . pop ( ) ( ) ;
You can’t perform that action at this time.
0 commit comments