mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-19 08:50:29 +00:00
fix incorrect matcher for addOrUpdateEta
This commit is contained in:
@@ -127,7 +127,7 @@ export class UnoptimizedInMemoryRepository implements Repository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async addOrUpdateEta(eta: IEta): Promise<void> {
|
public async addOrUpdateEta(eta: IEta): Promise<void> {
|
||||||
const index = this.etas.findIndex((e) => e.id === eta.id);
|
const index = this.etas.findIndex((e) => e.stopId === eta.stopId && e.shuttleId === eta.shuttleId);
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
this.etas[index] = eta;
|
this.etas[index] = eta;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user