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: nodejs#18593 (comment)
  • Loading branch information
Trott committed Feb 13, 2018
1 parent 60e612d commit dca2148
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 @@ -129,9 +129,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 dca2148

Please sign in to comment.