Skip to content

Commit

Permalink
module: remove unused code in module.js
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Trott committed Feb 16, 2018
1 parent a16081c commit 3b9cc42
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 3b9cc42

Please sign in to comment.