Use MatrixClientPeg::safeGet for strict typing (#10989)

This commit is contained in:
Michael Telatynski
2023-06-21 17:29:44 +01:00
committed by GitHub
parent d64018ce26
commit 9b5b053148
60 changed files with 225 additions and 203 deletions
+1 -1
View File
@@ -149,7 +149,7 @@ export class CapabilityText {
return { primary: _t("The above, but in any room you are joined or invited to as well") };
} else {
const roomId = getTimelineRoomIDFromCapability(capability);
const room = MatrixClientPeg.get().getRoom(roomId);
const room = MatrixClientPeg.safeGet().getRoom(roomId);
return {
primary: _t(
"The above, but in <Room /> as well",