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>
This commit is contained in:
parent
a16081cbad
commit
3b9cc424a4
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user