lib: simplify check in child_process

PR-URL: https://github.com/nodejs/node/pull/37367
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
Darshan Sen 2021-02-14 21:35:18 +05:30 committed by Danielle Adams
parent d808db2732
commit c6198fddc7
No known key found for this signature in database
GPG Key ID: D3A89613643B6201

View File

@ -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++;
}