File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ let index = 0
24
24
* Reset the scheduler's state.
25
25
*/
26
26
function resetSchedulerState () {
27
- queue . length = activatedChildren . length = 0
27
+ index = queue . length = activatedChildren . length = 0
28
28
has = { }
29
29
if ( process . env . NODE_ENV !== 'production' ) {
30
30
circular = { }
@@ -134,10 +134,10 @@ export function queueWatcher (watcher: Watcher) {
134
134
// if already flushing, splice the watcher based on its id
135
135
// if already past its id, it will be run next immediately.
136
136
let i = queue . length - 1
137
- while ( i >= 0 && queue [ i ] . id > watcher . id ) {
137
+ while ( i > index && queue [ i ] . id > watcher . id ) {
138
138
i --
139
139
}
140
- queue.splice(Math.max(i, index) + 1, 0, watcher)
140
+ queue.splice(i + 1, 0, watcher)
141
141
}
142
142
// queue the flush
143
143
if ( ! waiting ) {
You can’t perform that action at this time.
0 commit comments