Fix isProgramUpToDate when changing rootFileNames (#36011)

This commit is contained in:
Yacine Hmito
2020-01-21 20:26:17 +01:00
committed by Sheetal Nandi
parent f588c78aab
commit 4445e1147c
2 changed files with 211 additions and 131 deletions

View File

@@ -571,14 +571,14 @@ namespace ts {
return false;
}
// If number of files in the program do not match, it is not up-to-date
if (program.getRootFileNames().length !== rootFileNames.length) {
// If root file names don't match
if (!arrayIsEqualTo(program.getRootFileNames(), rootFileNames)) {
return false;
}
let seenResolvedRefs: ResolvedProjectReference[] | undefined;
// If project references dont match
// If project references don't match
if (!arrayIsEqualTo(program.getProjectReferences(), projectReferences, projectReferenceUptoDate)) {
return false;
}