Skip to content

Commit

Permalink
fix(gatsby): fix eventemitter leak in page query runner (gatsbyjs#10593)
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars authored and gpetrioli committed Jan 22, 2019
1 parent 9c55aa0 commit 8af6e3d
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,11 @@ const runQueriesForPathnames = pathnames => {
}

return new Promise(resolve => {
queue.on(`drain`, () => {
const onDrain = () => {
queue.off(`drain`, onDrain)
resolve()
})
}
queue.on(`drain`, onDrain)
})
}

Expand Down

0 comments on commit 8af6e3d

Please sign in to comment.