fix incorrect ID used for eta filter

This commit is contained in:
2025-01-08 16:30:07 -08:00
parent a7efda6fba
commit 638d15ccd8

View File

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