Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Jan 17, 2024
1 parent d47d7b6 commit 5985b90
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions packages/vite/src/node/ssr/runtime/hmrHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,15 @@ class Queue {
if (!item) {
return false
}
try {
this.pending = true
item
.promise()
.then((value) => {
this.pending = false
item.resolve(value)
this.dequeue()
})
.catch((err) => {
this.pending = false
item.reject(err)
this.dequeue()
})
} catch (err) {
this.pending = false
item.reject(err)
this.dequeue()
}
this.pending = true
item
.promise()
.then(item.resolve)
.catch(item.reject)
.finally(() => {
this.pending = false
this.dequeue()
})
return true
}
}
Expand Down

0 comments on commit 5985b90

Please sign in to comment.