At least one fewer test should fail now
Some checks failed
continuous-integration/drone/pr Build is failing

ref #190
This commit is contained in:
2021-04-07 16:17:37 +02:00
parent 4a73eab134
commit 87f444c30d
3 changed files with 16 additions and 6 deletions

View File

@@ -76,10 +76,22 @@ export class ResponseStatsRunner implements IResponse {
public constructor(runner: Runner, laptime?: number) {
this.id = runner.id;
this.firstname = runner.firstname;
this.middlename = runner.middlename;
if (runner.firstname) {
this.middlename = runner.middlename;
}
this.lastname = runner.lastname;
this.distance = runner.distance;
this.donationAmount = runner.distanceDonationAmount;
try {
this.distance = runner.distance;
}
catch {
this.distance = -1;
}
try {
this.donationAmount = runner.distanceDonationAmount;
}
catch {
this.donationAmount = -1;
}
if (laptime) {
this.minLaptime = laptime;
}