Skip to content

Commit 3b9cc42

Browse files
committed
module: remove unused code in module.js
Remove unnecessary condition in lib/module.js. Refs: #18593 (comment) PR-URL: #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>
1 parent a16081c commit 3b9cc42

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

lib/module.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,6 @@ function readPackage(requestPath) {
128128
return false;
129129
}
130130

131-
if (json === '')
132-
return packageMainCache[requestPath] = undefined;
133-
134131
try {
135132
var pkg = packageMainCache[requestPath] = JSON.parse(json).main;
136133
} catch (e) {

0 commit comments

Comments
 (0)