mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-01-02 16:01:55 +00:00
UsersService: Add null
check to toUserDto()
converter
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
6805c2a41e
commit
fae8c679a9
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…
Reference in a new issue