Skip to content

Commit

Permalink
lib: clarify the usage of 'else'
Browse files Browse the repository at this point in the history
The keyword 'else' is unnecessary after 'throw' statements.

PR-URL: #11148
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
  • Loading branch information
JacksonTian authored and MylesBorins committed Mar 28, 2017
1 parent ac92d02 commit 7347860
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/child_process.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,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:
Expand Down Expand Up @@ -502,8 +502,8 @@ function execFileSync(/*command, args, options*/) {

if (err)
throw err;
else
return ret.stdout;

return ret.stdout;
}
exports.execFileSync = execFileSync;

Expand All @@ -522,7 +522,7 @@ function execSync(command /*, options*/) {

if (err)
throw err;
else
return ret.stdout;

return ret.stdout;
}
exports.execSync = execSync;

0 comments on commit 7347860

Please sign in to comment.