We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c702f98 commit f55e570Copy full SHA for f55e570
lib/agentCompatibility.js
@@ -9,10 +9,8 @@ import {versions} from 'node:process';
9
const AGENT_CACHE = new WeakMap();
10
11
// can only convert agent to dispatcher option on node 18.2+
12
-const [major, minor] = versions.node.split('.');
13
-const canConvert =
14
- (parseInt(major, 10) > 18) ||
15
- (parseInt(major, 10) === 18 && parseInt(minor, 10) >= 2);
+const [major, minor] = versions.node.split('.').map(v => parseInt(v, 10));
+const canConvert = (major > 18) || (major === 18 && minor >= 2);
16
17
// converts `agent`/`httpsAgent` option to a dispatcher option
18
export function convertAgent(options) {
0 commit comments