From dca2148f9d98815ac5241e819dbc612e447e0101 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 13 Feb 2018 15:02:32 -0800 Subject: [PATCH] module: remove unused code in module.js Remove unnecessary condition in lib/module.js. Refs: https://github.com/nodejs/node/pull/18593#issuecomment-364927965 --- lib/module.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/module.js b/lib/module.js index 5ee537f157289b..66a02fa27a4c50 100644 --- a/lib/module.js +++ b/lib/module.js @@ -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) {