Fixed runner scan validation bug

ref #67
This commit is contained in:
2021-01-07 16:59:57 +01:00
parent e67d1c5697
commit edac1a224c
3 changed files with 2 additions and 3 deletions

View File

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