Skip to content

Remove unnecessary assert#11680

Merged
2 commits merged into
masterfrom
unnecessary_assert
Oct 17, 2016
Merged

Remove unnecessary assert#11680
2 commits merged into
masterfrom
unnecessary_assert

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Oct 17, 2016

No description provided.

Comment thread src/server/scriptInfo.ts Outdated
}
Debug.assert(this.containingProjects.length !== 0);
return this.containingProjects[0];
return this.containingProjects.length === 0 ? Errors.ThrowNoProject() : this.containingProjects[0];
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Less ternary

@ghost ghost force-pushed the unnecessary_assert branch from 7611b8a to 4c5a728 Compare October 17, 2016 17:27
@ghost ghost merged commit 19ae490 into master Oct 17, 2016
@ghost ghost deleted the unnecessary_assert branch October 17, 2016 19:33
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants