diff --git a/lib/node/http-parser.js b/lib/node/http-parser.js index c6d0fc88b49..0039a55559c 100644 --- a/lib/node/http-parser.js +++ b/lib/node/http-parser.js @@ -1,6 +1,11 @@ 'use strict' // TODO: This is not really allowed by Node but it works for now. -const { HTTPParser } = process.binding('http_parser') // eslint-disable-line +const common = require('_http_common') -module.exports = HTTPParser +if (common.HTTPParser) { + module.exports = common.HTTPParser +} else { + // Node 10 + module.exports = process.binding('http_parser').HTTPParser // eslint-disable-line +}