Fixed amount calculations

This commit is contained in:
niggl committed 2020-12-04 22:07:30 +01:00
1 parent b480912bd8
commit afef95e14e
4 files changed
+15 -9

No files matched your search

+1 -1
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;
}
}