7152-devToTest_2414 #2228
|
@ -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();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue