Skip to content

Commit

Permalink
carrier: Enhance null handling in TrackEvent.description for kr.epost…
Browse files Browse the repository at this point in the history
….ems
  • Loading branch information
shlee322 committed Jan 21, 2024
1 parent c4a4f07 commit cac116a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/carriers/kr.epost.ems/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? ""}`;
}

Expand Down

0 comments on commit cac116a

Please sign in to comment.