Skip to content

Commit 919f69a

Browse files
committed
1 parent 8be860d commit 919f69a

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

lib/mailparser.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ MailParser.prototype._processMimeTree = function() {
10391039
var len = this.mailData.text.length;
10401040
// if we have both html and text, process text till the length of html assuming its alternative for html
10411041
if (this.mailData.html.length) {
1042-
len = this.mailData.html.length;
1042+
len = Math.min(len, this.mailData.html.length);
10431043
}
10441044
for (i = 0, len; i < len; i++) {
10451045
if (!returnValue.text && this.mailData.text[i].content) {
@@ -1059,7 +1059,6 @@ MailParser.prototype._processMimeTree = function() {
10591059
}
10601060
}
10611061

1062-
10631062
if (this.mailData.calendar.length) {
10641063
returnValue.alternatives = [];
10651064
for (i = 0, len = this.mailData.calendar.length; i < len; i++) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mailparser",
33
"description": "Asynchronous and non-blocking parser for mime encoded e-mail messages",
4-
"version": "0.6.0",
4+
"version": "0.6.1",
55
"author": "Andris Reinman",
66
"maintainers": [{
77
"name": "andris",

0 commit comments

Comments
 (0)