Skip to content

Commit 5070a32

Browse files
RomansBermansandris9
authored andcommitted
Replaces optional chaining
1 parent 80ba89e commit 5070a32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/simple-parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ module.exports = (input, options, callback) => {
8787

8888
parser.on('end', () => {
8989
['subject', 'references', 'date', 'to', 'from', 'to', 'cc', 'bcc', 'message-id', 'in-reply-to', 'reply-to'].forEach(key => {
90-
if (mail.headers?.has(key)) {
90+
if (mail.headers && mail.headers.has(key)) {
9191
mail[key.replace(/-([a-z])/g, (m, c) => c.toUpperCase())] = mail.headers.get(key);
9292
}
9393
});

0 commit comments

Comments
 (0)