diff --git a/src/util/headsignUtils.ts b/src/util/headsignUtils.ts index 9d4552cf..98e7cf67 100644 --- a/src/util/headsignUtils.ts +++ b/src/util/headsignUtils.ts @@ -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();