mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-28 14:04:43 -04:00
fix: change sessionstate type to prevent unset values
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
f78fd69bf4
commit
229d4a4a1d
6 changed files with 26 additions and 27 deletions
|
@ -110,6 +110,9 @@ export class WebsocketGateway implements OnGatewayConnection {
|
|||
const username = await this.sessionService.fetchUsernameForSessionId(
|
||||
sessionId.get(),
|
||||
);
|
||||
if (username === undefined) {
|
||||
return null;
|
||||
}
|
||||
return await this.userService.getUserByUsername(username);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue