refs #6913 routeKm #2156
|
@ -30,9 +30,11 @@ module.exports = Self => {
|
||||||
});
|
});
|
||||||
|
|
||||||
function validateDistance(err) {
|
function validateDistance(err) {
|
||||||
const routeTotalKm = this.kmEnd - this.kmStart;
|
if (this.kmEnd) {
|
||||||
const routeMaxKm = 4000;
|
const routeTotalKm = this.kmEnd - this.kmStart;
|
||||||
if (routeTotalKm > routeMaxKm || this.kmStart > this.kmEnd)
|
const routeMaxKm = 4000;
|
||||||
err();
|
if (routeTotalKm > routeMaxKm || this.kmStart > this.kmEnd)
|
||||||
|
err();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue