Skip to content

Commit

Permalink
refactor: use for of
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Sep 14, 2021
1 parent 53ea83d commit 771a666
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scheduler.ts
Expand Up @@ -13,8 +13,8 @@ export const queueJob = (job: Function) => {
}

const flushJobs = () => {
for (let i = 0; i < queue.length; i++) {
queue[i]()
for (const job of queue) {
job()
}
queue.length = 0
queued = false
Expand Down

0 comments on commit 771a666

Please sign in to comment.