Skip to content

Commit d3a6427

Browse files
wKovacs64gpetrioli
authored andcommitted
fix(query-runner): replace .off with .removeListener (gatsbyjs#10613)
<!-- Have any questions? Check out the contributing docs at https://gatsby.app/contribute, or ask in this Pull Request and a Gatsby maintainer will be happy to help :) --> ## Description <!-- Write a brief description of the changes introduced by this PR --> This fixes a bug introduced in gatsbyjs#10593 by replacing the `.off` call with `.removeListener`. `.off` was introduced in Node v10.0.0 as an alias for `.removeListener` (nodejs/node#17156). ## Related Issues <!-- Link to the issue that is fixed by this PR (if there is one) e.g. Fixes gatsbyjs#1234, Addresses gatsbyjs#1234, Related to gatsbyjs#1234, etc. --> Related to gatsbyjs#10612
1 parent 3fddda7 commit d3a6427

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/gatsby/src/internal-plugins/query-runner/page-query-runner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ const runQueriesForPathnames = pathnames => {
163163

164164
return new Promise(resolve => {
165165
const onDrain = () => {
166-
queue.off(`drain`, onDrain)
166+
queue.removeListener(`drain`, onDrain)
167167
resolve()
168168
}
169169
queue.on(`drain`, onDrain)

0 commit comments

Comments
 (0)