File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import {
18
18
} from '../util/index'
19
19
20
20
import Dep , { pushTarget , popTarget } from '../observer/dep'
21
- import { afterFlush , forceFlush } from '../observer/scheduler'
21
+ import { afterFlush , forceFlush , isFlushing } from '../observer/scheduler'
22
22
import Watcher from '../observer/watcher'
23
23
24
24
export function initGlobalAPI ( Vue : GlobalAPI ) {
@@ -51,6 +51,7 @@ export function initGlobalAPI (Vue: GlobalAPI) {
51
51
popTarget,
52
52
afterFlush,
53
53
forceFlush,
54
+ isFlushing,
54
55
Watcher
55
56
}
56
57
Original file line number Diff line number Diff line change @@ -212,6 +212,13 @@ export function forceFlush (maxUpdateCount?: number) {
212
212
flushSchedulerQueue ( maxUpdateCount )
213
213
}
214
214
215
+ /**
216
+ * Are we inside a flush?
217
+ */
218
+ export function isFlushing () {
219
+ return flushing ;
220
+ }
221
+
215
222
/**
216
223
* Used in watchers to wrap provided getters to set scheduler flags.
217
224
*/
You can’t perform that action at this time.
0 commit comments