Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix strict type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
weeman1337 committed Nov 29, 2022
1 parent a0b27a7 commit c2eac6c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/voice-broadcast/hooks/useVoiceBroadcastPlayback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ import {
export const useVoiceBroadcastPlayback = (playback: VoiceBroadcastPlayback) => {
const client = MatrixClientPeg.get();
const room = client.getRoom(playback.infoEvent.getRoomId());

if (!room) {
throw new Error(
`Voice Broadcast room not found (event ${playback.infoEvent.getId()})`,
);
}

const playbackToggle = () => {
playback.toggle();
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ describe("VoiceBroadcastHeader", () => {

const renderHeader = (
live: VoiceBroadcastLiveness,
showBroadcast: boolean = undefined,
buffering: boolean = undefined,
showBroadcast?: boolean,
buffering?: boolean,
): RenderResult => {
return render(<VoiceBroadcastHeader
live={live}
Expand Down

0 comments on commit c2eac6c

Please sign in to comment.