fix: NaN in routing
This commit is contained in:
@ -82,6 +82,7 @@
|
|||||||
|
|
||||||
const roundDistance = $derived.by(() => {
|
const roundDistance = $derived.by(() => {
|
||||||
const dist = Math.round(distance);
|
const dist = Math.round(distance);
|
||||||
|
if (isNaN(dist)) return 0;
|
||||||
if (dist < 100) {
|
if (dist < 100) {
|
||||||
return Math.round(dist / 5) * 5;
|
return Math.round(dist / 5) * 5;
|
||||||
} else if (dist < 1000) {
|
} else if (dist < 1000) {
|
||||||
|
|||||||
Reference in New Issue
Block a user