We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65b1cf6 commit 8a2d161Copy full SHA for 8a2d161
src/server/scriptInfo.ts
@@ -84,11 +84,7 @@ namespace ts.server {
84
}
85
86
getDefaultProject() {
87
- if (this.containingProjects.length === 0) {
88
- return Errors.ThrowNoProject();
89
- }
90
- Debug.assert(this.containingProjects.length !== 0);
91
- return this.containingProjects[0];
+ return this.containingProjects.length === 0 ? Errors.ThrowNoProject() : this.containingProjects[0];
92
93
94
setFormatOptions(formatSettings: FormatCodeSettings): void {
0 commit comments