Skip to content

Commit dd33c76

Browse files
dumbasPLandris9
authored andcommitted
remove redundant content type check
1 parent b1d6a25 commit dd33c76

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/mail-parser.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,11 +1045,9 @@ class MailParser extends Transform {
10451045
html.replace(/\bcid:([^'"\s]{1,256})/g, (match, cid) => {
10461046
for (let i = 0, len = this.attachmentList.length; i < len; i++) {
10471047
if (this.attachmentList[i].cid === cid && /^image\/[\w]+$/i.test(this.attachmentList[i].contentType)) {
1048-
if (/^image\/[\w]+$/i.test(this.attachmentList[i].contentType)) {
1049-
cids.set(cid, {
1050-
attachment: this.attachmentList[i]
1051-
});
1052-
}
1048+
cids.set(cid, {
1049+
attachment: this.attachmentList[i]
1050+
});
10531051
break;
10541052
}
10551053
}

0 commit comments

Comments
 (0)