Skip to content

Commit

Permalink
DT-6096 null check for headsign
Browse files Browse the repository at this point in the history
  • Loading branch information
sharhio committed Oct 10, 2023
1 parent b47ca17 commit 81a2c88
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 81a2c88

Please sign in to comment.