Fix crashes

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura
2021-12-10 11:45:43 +05:30
parent 299ceac557
commit 20443f8a4d
2 changed files with 3 additions and 2 deletions

View File

@@ -32,7 +32,7 @@ function useJumpToEvent(roomTimeline) {
// we only show "Jump to unread" btn only if the event is not in timeline.
// if event is in timeline
// we will automatically open the timeline from that event position
if (!readEventId.startsWith('~') && !roomTimeline.hasEventInTimeline(readEventId)) {
if (!readEventId?.startsWith('~') && !roomTimeline.hasEventInTimeline(readEventId)) {
setEventId(readEventId);
}