mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-11 16:38:46 -05:00
Remove unnecessary assert
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user