summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJackson Tian <shyvo1987@gmail.com>2017-02-04 00:50:12 +0800
committerFranziska Hinkelmann <franzih@chromium.org>2017-03-26 12:14:11 +0200
commitdc9717c805023d23e3a449ef9eedda045c91d532 (patch)
treea7cd64771e01b68bea2848a641cb982d58ec6959 /lib
parent3745a4db27096a89adb2dee84317ba2a2d779bb9 (diff)
downloadandroid-node-v8-dc9717c805023d23e3a449ef9eedda045c91d532.tar.gz
android-node-v8-dc9717c805023d23e3a449ef9eedda045c91d532.tar.bz2
android-node-v8-dc9717c805023d23e3a449ef9eedda045c91d532.zip
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/child_process.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/child_process.js b/lib/child_process.js
index ab9ceb5bad..c2811109b7 100644
--- a/lib/child_process.js
+++ b/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;