From 7b1770527f1e18d24193f6dd8370488f1dd2ee40 Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Sun, 14 Feb 2021 21:35:18 +0530 Subject: [PATCH] lib: simplify check in child_process PR-URL: https://github.com/nodejs/node/pull/37367 Reviewed-By: James M Snell Reviewed-By: Antoine du Hamel --- lib/child_process.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/child_process.js b/lib/child_process.js index 4325caa9496eb1..e8fefce87d7671 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -99,8 +99,7 @@ function fork(modulePath /* , args, options */) { args = arguments[pos++]; } - if (pos < arguments.length && - (arguments[pos] === undefined || arguments[pos] === null)) { + if (pos < arguments.length && arguments[pos] == null) { pos++; }