mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
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>
This commit is contained in:
1 parent
3745a4db27
commit
dc9717c805
1 file changed
+6
-6
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user