mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-04-14 14:04:30 +00:00
UsersService: Add null
check to toUserDto()
converter
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
9cae7e34dc
commit
615bd6496b
1 changed files with 4 additions and 0 deletions
|
@ -31,6 +31,10 @@ export class UsersService {
|
|||
this.logger.warn('toUserDto recieved undefined argument!');
|
||||
return null;
|
||||
}
|
||||
if (user === null) {
|
||||
this.logger.warn('toUserDto recieved null argument!');
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
userName: user.userName,
|
||||
displayName: user.displayName,
|
||||
|
|
Loading…
Add table
Reference in a new issue