From 81a2c884b738ab9fe2a53321285d4ea7744b9d9d Mon Sep 17 00:00:00 2001 From: Harhio Date: Tue, 10 Oct 2023 09:27:13 +0300 Subject: [PATCH] DT-6096 null check for headsign --- src/util/headsignUtils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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();