Skip to content

Commit

Permalink
carrier: Enhance content of TrackEvent.description in kr.epost.ems
Browse files Browse the repository at this point in the history
  • Loading branch information
shlee322 committed Jan 21, 2024
1 parent fcf8093 commit c4a4f07
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/core/src/carriers/kr.epost.ems/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ class KoreaPostEMSTrackScraper {
const time = tds[0].textContent?.replace(/\s+/g, " ")?.trim() ?? null;
const status = tds[1].textContent?.replace(/\s+/g, " ")?.trim() ?? null;
const location = tds[2].textContent?.replace(/\s+/g, " ")?.trim() ?? null;
const description = tds[3].textContent?.replace(/\s+/g, " ")?.trim() ?? null;
let description = tds[3].textContent?.replace(/\s+/g, " ")?.trim() ?? null;
if (description === "") {
description = `${status ?? ""} - ${location ?? ""}`;
}

return {
status: this.parseStatus(status),
Expand Down

0 comments on commit c4a4f07

Please sign in to comment.