From 638d15ccd8a2d6ef091280537f7adad989fc6ab0 Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Wed, 8 Jan 2025 16:30:07 -0800 Subject: [PATCH] fix incorrect ID used for eta filter --- src/repositories/ApiBasedRepository.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/repositories/ApiBasedRepository.ts b/src/repositories/ApiBasedRepository.ts index 788e334..e1ca9d1 100644 --- a/src/repositories/ApiBasedRepository.ts +++ b/src/repositories/ApiBasedRepository.ts @@ -73,8 +73,8 @@ export class ApiBasedRepository implements GetterRepository { } await this.updateEtasForSystemIfTTL(systemId); - if (this.cache?.etasForStopId && this.cache.etasForStopId[systemId]) { - const etas = this.cache.etasForStopId[systemId]; + if (this.cache?.etasForStopId && this.cache.etasForStopId[stopId]) { + const etas = this.cache.etasForStopId[stopId]; const foundEta = etas.find((eta) => eta.stopId === stopId); if (foundEta) { return foundEta;