From b8742ce3bb46fcddb7c85f4ce329898140daa884 Mon Sep 17 00:00:00 2001 From: David Wheatley Date: Tue, 13 Feb 2024 15:34:27 +0000 Subject: [PATCH] fix: show no etd as delayed --- src/api/ProcessServices.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/ProcessServices.ts b/src/api/ProcessServices.ts index 1278e66..9bc841f 100644 --- a/src/api/ProcessServices.ts +++ b/src/api/ProcessServices.ts @@ -118,10 +118,10 @@ class Service implements IMyTrainService { displayedDepartureTime(): string { if (this.cancelled) return 'Cancelled'; if (this.hasDeparted || this.hasArrived) return 'Arrived'; + if (!this.estimatedDeparture) return 'Delayed'; if (!this.isDelayed()) return 'On time'; if (this.estimatedDeparture) return dayjs(this.estimatedDeparture).format('HH:mm'); - if (this.scheduledDeparture) return dayjs(this.scheduledDeparture).format('HH:mm'); - return 'Delayed'; + return dayjs(this.scheduledDeparture).format('HH:mm'); } constructor({