fix conditional check for getEtaForShuttleAndStopId

This commit is contained in:
2025-01-08 16:25:56 -08:00
parent 88dbce007d
commit a7efda6fba

View File

@@ -73,7 +73,7 @@ export class ApiBasedRepository implements GetterRepository {
}
await this.updateEtasForSystemIfTTL(systemId);
if (this.cache?.etasForStopId !== undefined) {
if (this.cache?.etasForStopId && this.cache.etasForStopId[systemId]) {
const etas = this.cache.etasForStopId[systemId];
const foundEta = etas.find((eta) => eta.stopId === stopId);
if (foundEta) {