From cac116a98effb30cd9957da48849ec93254e2e51 Mon Sep 17 00:00:00 2001 From: Vint Sanghyeok Lee Date: Sun, 21 Jan 2024 09:22:49 +0000 Subject: [PATCH] carrier: Enhance null handling in TrackEvent.description for kr.epost.ems --- packages/core/src/carriers/kr.epost.ems/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/carriers/kr.epost.ems/index.ts b/packages/core/src/carriers/kr.epost.ems/index.ts index 63085da..fb5d997 100644 --- a/packages/core/src/carriers/kr.epost.ems/index.ts +++ b/packages/core/src/carriers/kr.epost.ems/index.ts @@ -81,7 +81,7 @@ class KoreaPostEMSTrackScraper { const status = tds[1].textContent?.replace(/\s+/g, " ")?.trim() ?? null; const location = tds[2].textContent?.replace(/\s+/g, " ")?.trim() ?? null; let description = tds[3].textContent?.replace(/\s+/g, " ")?.trim() ?? null; - if (description === "") { + if (description === "" || description === null) { description = `${status ?? ""} - ${location ?? ""}`; }