From f66c52a6aad6621db15575762bbb7490c3ad82b2 Mon Sep 17 00:00:00 2001 From: Thomas Kam Date: Sun, 16 Jun 2024 01:47:26 -0400 Subject: [PATCH] fix bookmark direction --- src/components/parser/multiStopParser.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/parser/multiStopParser.ts b/src/components/parser/multiStopParser.ts index 104db98..72fbab0 100644 --- a/src/components/parser/multiStopParser.ts +++ b/src/components/parser/multiStopParser.ts @@ -17,9 +17,9 @@ const parseEtaPredictions = (stop: EtaPredictions, result: LineStopEta[]) => { direction: stop.dirTitleBecauseNoPredictions ? parseRoute(stop.dirTitleBecauseNoPredictions).prefix : parseRoute( - Array.isArray(stop.direction) + (Array.isArray(stop.direction) ? stop.direction[0].title - : stop.direction.title + : stop.direction.title) ?? "" ).prefix, }); if (stop.dirTitleBecauseNoPredictions === undefined) { @@ -74,7 +74,7 @@ export function multiStopUnifier( const matchingStop = unifiedList.findIndex( (searching) => item.stopTag === searching.ttcId ); - if (unifiedList[matchingStop].direction) { + if (item.direction) { unifiedList[matchingStop].direction = item.direction; } else if ( unifiedList[matchingStop].direction?.toLowerCase() !==