Conform more of the codebase to strictNullChecks
(#10504
* Conform more of the codebase to `strictNullChecks` * Iterate
This commit is contained in:
parent
6db0c7a1a6
commit
bc60a9b594
18 changed files with 60 additions and 54 deletions
|
@ -28,7 +28,7 @@ export const useBeacon = (beaconInfoEvent: MatrixEvent): Beacon | undefined => {
|
|||
const roomId = beaconInfoEvent.getRoomId();
|
||||
const beaconIdentifier = getBeaconInfoIdentifier(beaconInfoEvent);
|
||||
|
||||
const room = matrixClient.getRoom(roomId);
|
||||
const room = matrixClient?.getRoom(roomId);
|
||||
const beaconInstance = room?.currentState.beacons.get(beaconIdentifier);
|
||||
|
||||
// TODO could this be less stupid?
|
||||
|
|
|
@ -475,8 +475,8 @@ function isHostnameIpAddress(hostname: string): boolean {
|
|||
return isIp(hostname);
|
||||
}
|
||||
|
||||
export const calculateRoomVia = (room: Room): string[] | undefined => {
|
||||
export const calculateRoomVia = (room: Room): string[] => {
|
||||
const permalinkCreator = new RoomPermalinkCreator(room);
|
||||
permalinkCreator.load();
|
||||
return permalinkCreator.serverCandidates;
|
||||
return permalinkCreator.serverCandidates ?? [];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue