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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
  • 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.