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

Commit

Permalink
Make ts-strict happy :)
Browse files Browse the repository at this point in the history
  • Loading branch information
justjanne committed Jan 8, 2023
1 parent b1e15a4 commit 05d6e15
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/components/structures/ThreadPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,12 @@ const ThreadPanel: React.FC<IProps> = ({ roomId, onClose, permalinkCreator }) =>

const timelineSet: Optional<EventTimelineSet> =
filterOption === ThreadFilterType.My ? room?.threadsTimelineSets[1] : room?.threadsTimelineSets[0];
const hasThreads = room?.threadsTimelineSets[0]?.getLiveTimeline()?.getEvents()?.length > 0;
const hasThreads = Boolean(room?.threadsTimelineSets?.[0]?.getLiveTimeline()?.getEvents()?.length);

useEffect(() => {
const room = mxClient.getRoom(roomId);
room.createThreadsTimelineSets()
.then(() => {
return room.fetchRoomThreads();
})
room?.createThreadsTimelineSets()
.then(() => room.fetchRoomThreads())
.then(() => {
setFilterOption(ThreadFilterType.All);
setRoom(room);
Expand Down

0 comments on commit 05d6e15

Please sign in to comment.