Fixed amount calculations
This commit is contained in:
1 parent
b480912bd8
commit
afef95e14e
4 files changed
+15
-9
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user