Skip to content

Commit

Permalink
child_process: handling fork( path, undefined / null, obj )
Browse files Browse the repository at this point in the history
Closes: #20749
  • Loading branch information
shobhitchittora committed Aug 20, 2018
1 parent 4e7d829 commit 4ffbf08
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/child_process.js
Expand Up @@ -69,6 +69,11 @@ exports.fork = function fork(modulePath /* , args, options */) {
args = arguments[pos++];
}

if (pos < arguments.length && (arguments[pos] === undefined ||
arguments[pos] === null)) {
pos++;
}

if (pos < arguments.length && arguments[pos] != null) {
if (typeof arguments[pos] !== 'object') {
throw new ERR_INVALID_ARG_VALUE(`arguments[${pos}]`, arguments[pos]);
Expand Down

0 comments on commit 4ffbf08

Please sign in to comment.