Skip to content

Commit

Permalink
Merge pull request #418 from HSLdevcom/DT-6096
Browse files Browse the repository at this point in the history
DT-6096 null check for headsign
  • Loading branch information
Antiik91 authored Oct 10, 2023
2 parents b47ca17 + 81a2c88 commit c436afa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/headsignUtils.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export const trimMetroIcon = headsign =>
headsign
.toLowerCase()
?.toLowerCase()
.replace(/\(m\)/g, '')
.trim()
.replace(/\s{2,}/g, ' ');

export const getRenameDestinationId = (headsign: string, gtfsId: string) =>
headsign.concat(' - ', gtfsId).toLowerCase();
headsign?.concat(' - ', gtfsId).toLowerCase();

0 comments on commit c436afa

Please sign in to comment.