fix: don't allow blank space in collab name (#6211)

* don't allow blank space in collab name

* add spec

* prevent blank
This commit is contained in:
Aakansha Doshi 2023-02-09 15:51:49 +05:30 committed by GitHub
parent 8c1168ef33
commit c9d18ecab6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View file

@ -21,7 +21,7 @@ export const getClientColors = (clientId: string, appState: AppState) => {
};
export const getClientInitials = (userName?: string | null) => {
if (!userName) {
if (!userName?.trim()) {
return "?";
}
return userName.trim()[0].toUpperCase();