Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
Fix wrong comparison.
this.textEncoding was set before, this.transferEncoding is always undefined
  • Loading branch information
artur-krueger authored and andris9 committed Feb 25, 2021
1 parent 9b5fb94 commit 271f91b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mime-node/index.js
Expand Up @@ -451,7 +451,7 @@ class MimeNode {
transferEncoding = this._getTextEncoding(this.content) === 'Q' ? 'quoted-printable' : 'base64';
} else {
// we can not check content for a stream, so either use preferred encoding or fallback to QP
transferEncoding = this.transferEncoding === 'B' ? 'base64' : 'quoted-printable';
transferEncoding = this.textEncoding === 'B' ? 'base64' : 'quoted-printable';
}
} else if (!/^(multipart|message)\//i.test(contentType)) {
transferEncoding = transferEncoding || 'base64';
Expand Down

0 comments on commit 271f91b

Please sign in to comment.