mirror of
https://github.com/nodemailer/wildduck.git
synced 2024-12-26 01:40:48 +08:00
fix(imap-indexer): fix fileContentHash error in imap indexer, check for attachmentInfo beforehand ZMS-186 (#756)
This commit is contained in:
parent
77600195f3
commit
7daa0e35d5
1 changed files with 2 additions and 1 deletions
|
@ -626,11 +626,12 @@ class Indexer {
|
||||||
mimeTree.attachmentMap[node.attachmentId] = id;
|
mimeTree.attachmentMap[node.attachmentId] = id;
|
||||||
|
|
||||||
let attachmentInfo = maildata.attachments && maildata.attachments.find(a => a.id === node.attachmentId); // get reference to attachment info
|
let attachmentInfo = maildata.attachments && maildata.attachments.find(a => a.id === node.attachmentId); // get reference to attachment info
|
||||||
|
|
||||||
if (attachmentInfo && node.body) {
|
if (attachmentInfo && node.body) {
|
||||||
attachmentInfo.size = node.body.length;
|
attachmentInfo.size = node.body.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fileContentHash) {
|
if (attachmentInfo && fileContentHash) {
|
||||||
attachmentInfo.fileContentHash = fileContentHash;
|
attachmentInfo.fileContentHash = fileContentHash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue