mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-06 16:25:52 +08:00
Handle null body when deciding which attachments to display #804
This commit is contained in:
parent
8df74d184d
commit
2623d8e7e5
1 changed files with 4 additions and 2 deletions
|
@ -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 (
|
||||
<div>
|
||||
|
|
Loading…
Reference in a new issue