fix: resolved TickingPromises should no longer tick

This commit is contained in:
cha0s 2019-09-08 07:48:08 -05:00
parent d77fc13592
commit a856950931

View File

@ -84,6 +84,10 @@ export class TickingPromise extends Promise {
const promise = promises[i];
if (promise instanceof TickingPromise) {
tickingPromises.push(promise);
// After resolution, stop ticking the promise.
promise.then(() => {
tickingPromises.splice(tickingPromises.indexOf(promise), 1);
})
}
}
if (0 === tickingPromises.length) {