mirror of https://github.com/vuejs/core.git
fix(scheduler): improve error handling in job flushing (#13587)
This commit is contained in:
parent
25e075d967
commit
94b2ddc6f9
|
@ -114,12 +114,18 @@ export function queueJob(job: SchedulerJob): void {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function queueFlush() {
|
const doFlushJobs = () => {
|
||||||
if (!currentFlushPromise) {
|
try {
|
||||||
currentFlushPromise = resolvedPromise.then(flushJobs).catch(e => {
|
flushJobs()
|
||||||
|
} catch (e) {
|
||||||
currentFlushPromise = null
|
currentFlushPromise = null
|
||||||
throw e
|
throw e
|
||||||
})
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function queueFlush() {
|
||||||
|
if (!currentFlushPromise) {
|
||||||
|
currentFlushPromise = resolvedPromise.then(doFlushJobs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue