| @@ -48,7 +48,7 @@ export class Runner extends Participant { | ||||
|    * This is implemented here to avoid duplicate code in other files. | ||||
|    */ | ||||
|   public get validScans(): Scan[] { | ||||
|     return this.scans.filter(scan => { scan.valid === true }); | ||||
|     return this.scans.filter(scan => scan.valid == true); | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|   | ||||
| @@ -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; | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user