When getting default project from session, get it only if the script info is not orphan

Since the closed script info's that are orphan arent removed immediately but on next open request, treat the orphan script infos as if they are not present in the session
This commit is contained in:
Sheetal Nandi
2017-08-18 13:13:12 -07:00
parent da0d374b30
commit c425128075
4 changed files with 59 additions and 14 deletions

View File

@@ -328,6 +328,10 @@ namespace ts.server {
}
}
isOrphan() {
return this.containingProjects.length === 0;
}
/**
* @param line 1 based index
*/