Skip to content
Snippets Groups Projects
Unverified Commit ead09079 authored by デワンシュ's avatar デワンシュ Committed by GitHub
Browse files

regression: empty attachments leads to a Moderation Console GUI crash (#31592)

parent 53b934e2
No related branches found
No related tags found
No related merge requests found
......@@ -77,7 +77,7 @@ const ContextMessage = ({
)}
{message.blocks && <UiKitMessageBlock rid={message.rid} mid={message._id} blocks={message.blocks} />}
{message.attachments && <Attachments id={message.files[0]._id} attachments={message.attachments} />}
{message.attachments?.length > 0 && <Attachments id={message.files?.[0]._id} attachments={message.attachments} />}
</Message.Body>
<ReportReasonCollapsible>
<MessageReportInfo msgId={message._id} />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment