Skip to content

Commit

Permalink
module: remove unnecessary nonInternalExists check
Browse files Browse the repository at this point in the history
The NativeModule.nonInternalExists(request) is unnecessary in
Module._resolveLookupPaths(), because the check is pre-exist in
Module._resolveFilename()
  • Loading branch information
JacksonTian committed Nov 29, 2017
1 parent 6c47033 commit d33739d
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,6 @@ if (process.platform === 'win32') {
var indexChars = [ 105, 110, 100, 101, 120, 46 ];
var indexLen = indexChars.length;
Module._resolveLookupPaths = function(request, parent, newReturn) {
if (NativeModule.nonInternalExists(request)) {
debug('looking for %j in []', request);
return (newReturn ? null : [request, []]);
}

// Check for relative path
if (request.length < 2 ||
request.charCodeAt(0) !== 46/*.*/ ||
Expand Down

0 comments on commit d33739d

Please sign in to comment.