Fixed amount calculations

This commit is contained in:
2020-12-04 22:07:30 +01:00
parent b480912bd8
commit afef95e14e
4 changed files with 15 additions and 9 deletions

View File

@@ -26,7 +26,7 @@ export class ResponseRunner extends ResponseParticipant {
public constructor(runner: Runner) {
super(runner);
this.distance = runner.scans.reduce((sum, current) => sum + current.distance, 0);
this.distance = runner.scans.filter(scan => { scan.valid === true }).reduce((sum, current) => sum + current.distance, 0);
this.group = runner.group;
}
}