refs #6913 routeKm
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Carlos Satorres 2024-03-12 08:25:01 +01:00
parent 99fccd1cd2
commit 6627c7a16a
1 changed files with 6 additions and 4 deletions

View File

@ -30,9 +30,11 @@ module.exports = Self => {
}); });
function validateDistance(err) { function validateDistance(err) {
if (this.kmEnd) {
const routeTotalKm = this.kmEnd - this.kmStart; const routeTotalKm = this.kmEnd - this.kmStart;
const routeMaxKm = 4000; const routeMaxKm = 4000;
if (routeTotalKm > routeMaxKm || this.kmStart > this.kmEnd) if (routeTotalKm > routeMaxKm || this.kmStart > this.kmEnd)
err(); err();
} }
}
}; };