Skip to content

Commit

Permalink
fix(gatsby): fix eventemitter leak in page query runner (#10593)
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars authored and pieh committed Dec 21, 2018
1 parent 43c1d34 commit 80a856f
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 80a856f

Please sign in to comment.