Only update ETAs in shuttle repository loader if repository was injected

This commit is contained in:
2025-11-19 11:43:04 -08:00
parent 545eaef74a
commit dbcc882a18

View File

@@ -37,10 +37,10 @@ export class ApiBasedShuttleRepositoryLoader implements ShuttleRepositoryLoader
await this.updateStopAndPolylineDataForRoutesInSystem(); await this.updateStopAndPolylineDataForRoutesInSystem();
await this.updateShuttleDataForSystemBasedOnProximityToRoutes(); await this.updateShuttleDataForSystemBasedOnProximityToRoutes();
// Because ETA method doesn't support pruning yet, if (this.etaRepository) {
// add a call to the clear method here
await this.updateEtaDataForExistingStopsForSystem(); await this.updateEtaDataForExistingStopsForSystem();
} }
}
public async updateRouteDataForSystem() { public async updateRouteDataForSystem() {
try { try {