From c25d46e9c195c7e6fa0ad9a79a1764de23bd380a Mon Sep 17 00:00:00 2001 From: NickOvt Date: Mon, 14 Oct 2024 10:56:19 +0300 Subject: [PATCH] fix(decoderHeaderStr): fix issue that decodedHeaderStr is undefined if decodeWords fails ZMS-179 (#24) --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 11c20c2..e7a6a17 100644 --- a/index.js +++ b/index.js @@ -20,6 +20,7 @@ function decodeHeaderLineIntoKeyValuePair(headerLine) { decodedHeaderStr = libmime.decodeWords(headerValue); } catch (err) { // keep the value as is + decodedHeaderStr = headerValue; } return [headerKey.trim(), decodedHeaderStr.trim()];