mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-11 01:34:55 -06:00
Remove unnecessary assert
This commit is contained in:
parent
65b1cf665e
commit
8a2d16134d
@ -84,11 +84,7 @@ namespace ts.server {
|
||||
}
|
||||
|
||||
getDefaultProject() {
|
||||
if (this.containingProjects.length === 0) {
|
||||
return Errors.ThrowNoProject();
|
||||
}
|
||||
Debug.assert(this.containingProjects.length !== 0);
|
||||
return this.containingProjects[0];
|
||||
return this.containingProjects.length === 0 ? Errors.ThrowNoProject() : this.containingProjects[0];
|
||||
}
|
||||
|
||||
setFormatOptions(formatSettings: FormatCodeSettings): void {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user