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