Conform more code to strictNullChecks
(#10444
* Conform more code to `strictNullChecks` * Fix tests * Fix tests
This commit is contained in:
parent
ba2608ec74
commit
c225b8ec29
29 changed files with 85 additions and 75 deletions
|
@ -75,8 +75,8 @@ export const usePermalinkEvent = (
|
|||
const fetchRoomEvent = async (): Promise<void> => {
|
||||
try {
|
||||
const eventData = await MatrixClientPeg.get().fetchRoomEvent(
|
||||
parseResult.roomIdOrAlias,
|
||||
parseResult.eventId,
|
||||
parseResult.roomIdOrAlias!,
|
||||
parseResult.eventId!,
|
||||
);
|
||||
setEvent(new MatrixEvent(eventData));
|
||||
} catch {}
|
||||
|
|
|
@ -83,7 +83,7 @@ const findRoom = (roomIdOrAlias: string): Room | null => {
|
|||
export const usePermalinkTargetRoom = (
|
||||
type: PillType | null,
|
||||
parseResult: PermalinkParts | null,
|
||||
permalinkRoom: Room | null,
|
||||
permalinkRoom: Room | undefined,
|
||||
): Room | null => {
|
||||
// The listed permalink types require a room.
|
||||
// If it cannot be initially determined, it will be looked up later by a memo hook.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue