@@ -282,12 +282,12 @@ namespace ts.moduleSpecifiers {
282
282
const redirects = host . redirectTargetsMap . get ( importedPath ) || emptyArray ;
283
283
const importedFileNames = [ ...( referenceRedirect ? [ referenceRedirect ] : emptyArray ) , importedFileName , ...redirects ] ;
284
284
const targets = importedFileNames . map ( f => getNormalizedAbsolutePath ( f , cwd ) ) ;
285
- let filterIgnoredPaths = some ( targets , not ( containsIgnoredPath ) ) ;
285
+ let shouldFilterIgnoredPaths = ! every ( targets , containsIgnoredPath ) ;
286
286
287
287
if ( ! preferSymlinks ) {
288
288
// Symlinks inside ignored paths are already filtered out of the symlink cache,
289
289
// so we only need to remove them from the realpath filenames.
290
- const result = forEach ( targets , p => ! ( filterIgnoredPaths && containsIgnoredPath ( p ) ) && cb ( p , referenceRedirect === p ) ) ;
290
+ const result = forEach ( targets , p => ! ( shouldFilterIgnoredPaths && containsIgnoredPath ( p ) ) && cb ( p , referenceRedirect === p ) ) ;
291
291
if ( result ) return result ;
292
292
}
293
293
const links = host . getSymlinkCache
@@ -314,13 +314,13 @@ namespace ts.moduleSpecifiers {
314
314
for ( const symlinkDirectory of symlinkDirectories ) {
315
315
const option = resolvePath ( symlinkDirectory , relative ) ;
316
316
const result = cb ( option , target === referenceRedirect ) ;
317
- filterIgnoredPaths = true ; // We found a non-ignored path in symlinks, so we can reject ignored-path realpaths
317
+ shouldFilterIgnoredPaths = true ; // We found a non-ignored path in symlinks, so we can reject ignored-path realpaths
318
318
if ( result ) return result ;
319
319
}
320
320
} ) ;
321
321
} ) ;
322
322
return result || ( preferSymlinks
323
- ? forEach ( targets , p => filterIgnoredPaths && containsIgnoredPath ( p ) ? undefined : cb ( p , p === referenceRedirect ) )
323
+ ? forEach ( targets , p => shouldFilterIgnoredPaths && containsIgnoredPath ( p ) ? undefined : cb ( p , p === referenceRedirect ) )
324
324
: undefined ) ;
325
325
}
326
326
0 commit comments