mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-11 10:46:28 -05:00
added missing check
This commit is contained in:
@@ -398,7 +398,7 @@ namespace ts.server {
|
||||
|
||||
getScriptInfo(fileName: string) {
|
||||
const scriptInfo = this.projectService.getOrCreateScriptInfo(fileName, /*openedByClient*/ false);
|
||||
if (!scriptInfo.defaultProject) {
|
||||
if (scriptInfo && !scriptInfo.defaultProject) {
|
||||
scriptInfo.defaultProject = this;
|
||||
}
|
||||
return scriptInfo;
|
||||
|
||||
Reference in New Issue
Block a user