From 8089b9c71106d0669e5e881a9ccab89b762c7cfc Mon Sep 17 00:00:00 2001 From: Jackson Tian Date: Sat, 4 Feb 2017 00:50:12 +0800 Subject: [PATCH] child_process: clarify the usage of 'else' the keyword 'else' is unnecessary after 'throw' statements. --- lib/child_process.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/child_process.js b/lib/child_process.js index 409dfff170cf4a..452f7b7ff67f09 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -35,9 +35,9 @@ exports.fork = function(modulePath /*, args, options*/) { if (pos < arguments.length && arguments[pos] != null) { if (typeof arguments[pos] !== 'object') { throw new TypeError('Incorrect value of args option'); - } else { - options = util._extend({}, arguments[pos++]); } + + options = util._extend({}, arguments[pos++]); } // Prepare arguments for fork: @@ -581,8 +581,8 @@ function execFileSync(/*command, args, options*/) { if (err) throw err; - else - return ret.stdout; + + return ret.stdout; } exports.execFileSync = execFileSync; @@ -601,8 +601,8 @@ function execSync(command /*, options*/) { if (err) throw err; - else - return ret.stdout; + + return ret.stdout; } exports.execSync = execSync;