Removed duplicate logic

This commit is contained in:
Bill Ticehurst 2016-07-10 23:07:45 -07:00
parent 97025d026d
commit 21bf801c6c

View file

@ -2091,13 +2091,6 @@ namespace ts {
currentNodeModulesDepth++;
}
if (currentNodeModulesDepth > 0) {
// If its already present with false, its a root file also. Don't override this.
if (!hasProperty(sourceFilesFoundSearchingNodeModules, resolvedPath)) {
sourceFilesFoundSearchingNodeModules[resolvedPath] = true;
}
}
const elideImport = isJsFileFromNodeModules && currentNodeModulesDepth > maxNodeModulesJsDepth;
const shouldAddFile = resolution && !options.noResolve && i < file.imports.length && !elideImport;