mirror of https://github.com/vector-im/riot-web
[Release] Fix useUserStatusMessage exploding on unknown user (#7419)
https://github.com/matrix-org/matrix-react-sdk/pull/7365 to releasepull/21833/head
parent
d10ac7cfdb
commit
8923da7bf7
|
@ -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 New Issue