@@ -282,12 +282,12 @@ namespace ts.moduleSpecifiers {
282282        const  redirects  =  host . redirectTargetsMap . get ( importedPath )  ||  emptyArray ; 
283283        const  importedFileNames  =  [ ...( referenceRedirect  ? [ referenceRedirect ]  : emptyArray ) ,  importedFileName ,  ...redirects ] ; 
284284        const  targets  =  importedFileNames . map ( f  =>  getNormalizedAbsolutePath ( f ,  cwd ) ) ; 
285-         let  filterIgnoredPaths  =  some ( targets ,  not ( containsIgnoredPath ) ) ; 
285+         let  shouldFilterIgnoredPaths  =  ! every ( targets ,  containsIgnoredPath ) ; 
286286
287287        if  ( ! preferSymlinks )  { 
288288            // Symlinks inside ignored paths are already filtered out of the symlink cache, 
289289            // 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 ) ) ; 
291291            if  ( result )  return  result ; 
292292        } 
293293        const  links  =  host . getSymlinkCache 
@@ -314,13 +314,13 @@ namespace ts.moduleSpecifiers {
314314                for  ( const  symlinkDirectory  of  symlinkDirectories )  { 
315315                    const  option  =  resolvePath ( symlinkDirectory ,  relative ) ; 
316316                    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 
318318                    if  ( result )  return  result ; 
319319                } 
320320            } ) ; 
321321        } ) ; 
322322        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 ) ) 
324324            : undefined ) ; 
325325    } 
326326
0 commit comments