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 <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
  • Loading branch information
JacksonTian authored and fhinkel committed Mar 26, 2017
1 parent 3745a4d commit dc9717c
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 @@ -63,9 +63,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 @@ -592,8 +592,8 @@ function execFileSync(/*command, args, options*/) {

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

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

Expand All @@ -612,8 +612,8 @@ function execSync(command /*, options*/) {

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

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

Expand Down

0 comments on commit dc9717c

Please sign in to comment.