diff --git a/app/internal_packages/message-list/lib/message-item.jsx b/app/internal_packages/message-list/lib/message-item.jsx index 39bcee2a6..e6a4d4ca0 100644 --- a/app/internal_packages/message-list/lib/message-item.jsx +++ b/app/internal_packages/message-list/lib/message-item.jsx @@ -101,9 +101,11 @@ export default class MessageItem extends React.Component { } _renderAttachments() { - const { files = [], body = '', id } = this.props.message; + const { files = [], body, id } = this.props.message; const { filePreviewPaths, downloads } = this.state; - const attachedFiles = files.filter(f => !f.contentId || !body.includes(`cid:${f.contentId}`)); + const attachedFiles = files.filter( + f => !f.contentId || !(body || '').includes(`cid:${f.contentId}`) + ); return (