Skip to content

Commit

Permalink
add fallback for platform character symbol (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
desmondlsl authored Nov 17, 2024
1 parent 942c1ee commit c4315bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/route-eta/TimeReport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ const EtaRemark = ({
// if the remark has more than one occurrence of numerical string
// or if the only numerical string occurrence are more than one digit, use original remark
if (platform.length === 2 && platform[1].length) {
// only support single digit number
ret = getPlatformSymbol(Number(platform[1]), platformMode);
// getPlatformSymbol only supports single digit number
ret = getPlatformSymbol(Number(platform[1]), platformMode) ?? platform[1];
}

const trains =
Expand Down

0 comments on commit c4315bd

Please sign in to comment.