You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-12-05 15:22:09 +03:00
Conform more of the codebase to strictNullChecks (#10505
* Conform more of the codebase to `strictNullChecks` * Iterate * Conform more of the codebase to `strictNullChecks` * Iterate * Iterate * Iterate * Iterate
This commit is contained in:
committed by
GitHub
parent
7503bf6b96
commit
e5a314617a
@@ -102,7 +102,7 @@ const Tile: React.FC<ITileProps> = ({
|
||||
}) => {
|
||||
const cli = useContext(MatrixClientContext);
|
||||
const [joinedRoom, setJoinedRoom] = useState<Room | undefined>(() => {
|
||||
const cliRoom = cli.getRoom(room.room_id);
|
||||
const cliRoom = cli?.getRoom(room.room_id);
|
||||
return cliRoom?.getMyMembership() === "join" ? cliRoom : undefined;
|
||||
});
|
||||
const joinedRoomName = useTypedEventEmitterState(joinedRoom, RoomEvent.Name, (room) => room?.name);
|
||||
|
||||
Reference in New Issue
Block a user