Skip to content

Commit

Permalink
child_process: clarify the usage of 'else'
Browse files Browse the repository at this point in the history
the keyword 'else' is unnecessary after 'throw' statements.
  • Loading branch information
JacksonTian committed Feb 6, 2017
1 parent 58dc229 commit 8089b9c
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 @@ -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:
Expand Down Expand Up @@ -581,8 +581,8 @@ function execFileSync(/*command, args, options*/) {

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

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

Expand All @@ -601,8 +601,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 8089b9c

Please sign in to comment.