Browse Source

lib: clarify the usage of 'else'

The keyword 'else' is unnecessary after 'throw' statements.

PR-URL: https://github.com/nodejs/node/pull/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>
v6
Jackson Tian 8 years ago
committed by Franziska Hinkelmann
parent
commit
dc9717c805
  1. 12
      lib/child_process.js

12
lib/child_process.js

@ -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:
@ -592,8 +592,8 @@ function execFileSync(/*command, args, options*/) {
if (err)
throw err;
else
return ret.stdout;
return ret.stdout;
}
exports.execFileSync = execFileSync;
@ -612,8 +612,8 @@ function execSync(command /*, options*/) {
if (err)
throw err;
else
return ret.stdout;
return ret.stdout;
}
exports.execSync = execSync;

Loading…
Cancel
Save