From fe47563bedca4157f7392b5917953f4f8a4ca283 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: Zijian Liu 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 fae9c930ebb..ad5bce3db04 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -85,8 +85,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++; }