From 367049bd086342207197bb519930c7915d9ccff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Thu, 2 Sep 2021 17:52:00 +0200 Subject: [PATCH] Improve typing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/structures/CallEventGrouper.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/structures/CallEventGrouper.ts b/src/components/structures/CallEventGrouper.ts index 16f8d6c68d..a19392b8fc 100644 --- a/src/components/structures/CallEventGrouper.ts +++ b/src/components/structures/CallEventGrouper.ts @@ -104,11 +104,11 @@ export default class CallEventGrouper extends EventEmitter { return ![...this.events].some((event) => event.sender?.userId === MatrixClientPeg.get().getUserId()); } - private get callId(): string { - return [...this.events][0].getContent().call_id; + private get callId(): string | undefined { + return [...this.events][0]?.getContent()?.call_id; } - private get roomId(): string { + private get roomId(): string | undefined { return [...this.events][0]?.getRoomId(); }