We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c1d6a14 commit a8dc65dCopy full SHA for a8dc65d
1 file changed
src/server/editorServices.ts
@@ -398,7 +398,7 @@ namespace ts.server {
398
399
getScriptInfo(fileName: string) {
400
const scriptInfo = this.projectService.getOrCreateScriptInfo(fileName, /*openedByClient*/ false);
401
- if (!scriptInfo.defaultProject) {
+ if (scriptInfo && !scriptInfo.defaultProject) {
402
scriptInfo.defaultProject = this;
403
}
404
return scriptInfo;
0 commit comments