From e1ba881be49ba5cf60bf1be8f144f347ae163aef Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Sat, 3 Feb 2024 21:33:31 +0000 Subject: [PATCH] Fix for ECS Headcodes Signed-off-by: Fred Boniface --- src/services/trainService.services.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/trainService.services.ts b/src/services/trainService.services.ts index 59c7598..449758c 100644 --- a/src/services/trainService.services.ts +++ b/src/services/trainService.services.ts @@ -98,7 +98,7 @@ async function fetchPisCode( } // Check if no public stops - then it should use an ECS headcode let pisData: OB_Pis_SimpleObject | null - if (tiplocList) { + if (tiplocList.length) { pisData = await findByTiplocArray(tiplocList); } else { pisData = {