summaryrefslogtreecommitdiff
path: root/lib/module.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2018-02-13 15:02:32 -0800
committerRich Trott <rtrott@gmail.com>2018-02-15 16:20:44 -0800
commit3b9cc424a4240c10003dca71c5a7478232e3d0d8 (patch)
tree4eab06cf1a558141d7b0ad970700910c4b6ae9c4 /lib/module.js
parenta16081cbad61e53f839c261f3aef11a249018653 (diff)
downloadandroid-node-v8-3b9cc424a4240c10003dca71c5a7478232e3d0d8.tar.gz
android-node-v8-3b9cc424a4240c10003dca71c5a7478232e3d0d8.tar.bz2
android-node-v8-3b9cc424a4240c10003dca71c5a7478232e3d0d8.zip
module: remove unused code in module.js
Remove unnecessary condition in lib/module.js. Refs: https://github.com/nodejs/node/pull/18593#issuecomment-364927965 PR-URL: https://github.com/nodejs/node/pull/18768 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Diffstat (limited to 'lib/module.js')
-rw-r--r--lib/module.js3
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/module.js b/lib/module.js
index c3250608eb..77ed83423b 100644
--- a/lib/module.js
+++ b/lib/module.js
@@ -128,9 +128,6 @@ function readPackage(requestPath) {
return false;
}
- if (json === '')
- return packageMainCache[requestPath] = undefined;
-
try {
var pkg = packageMainCache[requestPath] = JSON.parse(json).main;
} catch (e) {