diff options
Diffstat (limited to 'src/models')
| -rw-r--r-- | src/models/user.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/models/user.ts b/src/models/user.ts index f817c33aa2..7c1ee498d6 100644 --- a/src/models/user.ts +++ b/src/models/user.ts @@ -100,7 +100,7 @@ export function validatePassword(password: string): boolean { } export function isValidName(name: string): boolean { - return typeof name == 'string' && name.length < 30 && name.trim() != ''; + return name === null || (typeof name == 'string' && name.length < 30 && name.trim() != ''); } export function isValidDescription(description: string): boolean { |