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

Commit

Permalink
fix bug where ThreadSummary failed if no last reply is available
Browse files Browse the repository at this point in the history
  • Loading branch information
justjanne committed Oct 6, 2022
1 parent dd87e6a commit 7d73b7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/views/rooms/ThreadSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const ThreadMessagePreview = ({ thread, showDisplayname = false }: IPrevi
await cli.decryptEventIfNeeded(lastReply);
return MessagePreviewStore.instance.generatePreviewForEvent(lastReply);
}, [lastReply, content]);
if (!preview) return null;
if (!preview || !lastReply) return null;

return <>
<MemberAvatar
Expand Down

0 comments on commit 7d73b7e

Please sign in to comment.