mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
added missing check
This commit is contained in:
1 parent
c1d6a14a6b
commit
a8dc65de19
1 file changed
+1
-1
@@ -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