mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 02:05:45 +03:00
[Release] Fix useUserStatusMessage exploding on unknown user (#7419)
https://github.com/matrix-org/matrix-react-sdk/pull/7365 to release
This commit is contained in:
parent
d10ac7cfdb
commit
8923da7bf7
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ import { useFeatureEnabled } from "./useSettings";
|
|||
|
||||
const getUser = (cli: MatrixClient, user: Member): User => cli.getUser(user?.userId);
|
||||
const getStatusMessage = (cli: MatrixClient, user: Member): string => {
|
||||
return getUser(cli, user).unstable_statusMessage;
|
||||
return getUser(cli, user)?.unstable_statusMessage;
|
||||
};
|
||||
|
||||
// Hook to simplify handling Matrix User status
|
||||
|
|
Loading…
Reference in a new issue