diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/child_process.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/child_process.js b/lib/child_process.js index 53e0bb24f..640f68e61 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -525,6 +525,8 @@ exports.fork = function(modulePath /*, args, options*/) { if (Array.isArray(arguments[1])) { args = arguments[1]; options = util._extend({}, arguments[2]); + } else if (arguments[1] && typeof arguments[1] !== 'object') { + throw new TypeError('Incorrect value of args option'); } else { args = []; options = util._extend({}, arguments[1]); |