File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
Expand file tree Collapse file tree 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() {
1111 return current_component ;
1212}
1313
14- export function maybe_get_current_component ( ) {
15- return current_component ;
16- }
17-
1814export function beforeUpdate ( fn : ( ) => any ) {
1915 get_current_component ( ) . $$ . before_update . push ( fn ) ;
2016}
Original file line number Diff line number Diff line change 11import { run_all } from './utils' ;
2- import { maybe_get_current_component , set_current_component } from './lifecycle' ;
2+ import { current_component , set_current_component } from './lifecycle' ;
33
44export const dirty_components = [ ] ;
55export const intros = { enabled : false } ;
@@ -35,7 +35,7 @@ const seen_callbacks = new Set();
3535let flushidx = 0 ; // Do *not* move this inside the flush() function
3636export function flush ( ) {
3737
38- const current_component = maybe_get_current_component ( ) ;
38+ const saved_component = current_component ;
3939
4040 do {
4141 // first, call beforeUpdate functions
@@ -70,7 +70,7 @@ export function flush() {
7070 render_callbacks . length = 0 ;
7171 } while ( dirty_components . length ) ;
7272
73- set_current_component ( current_component ) ;
73+ set_current_component ( saved_component ) ;
7474
7575 while ( flush_callbacks . length ) {
7676 flush_callbacks . pop ( ) ( ) ;
You can’t perform that action at this time.
0 commit comments