Skip to content

Commit d33739d

Browse files
committed
module: remove unnecessary nonInternalExists check
The NativeModule.nonInternalExists(request) is unnecessary in Module._resolveLookupPaths(), because the check is pre-exist in Module._resolveFilename()
1 parent 6c47033 commit d33739d

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

lib/module.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -352,11 +352,6 @@ if (process.platform === 'win32') {
352352
var indexChars = [ 105, 110, 100, 101, 120, 46 ];
353353
var indexLen = indexChars.length;
354354
Module._resolveLookupPaths = function(request, parent, newReturn) {
355-
if (NativeModule.nonInternalExists(request)) {
356-
debug('looking for %j in []', request);
357-
return (newReturn ? null : [request, []]);
358-
}
359-
360355
// Check for relative path
361356
if (request.length < 2 ||
362357
request.charCodeAt(0) !== 46/*.*/ ||

0 commit comments

Comments
 (0)