Fix undefined error in DirectionIndicator

This commit is contained in:
Pieter Vander Vennet 2023-12-26 12:35:51 +01:00
parent 8b6ee877f0
commit 0733c46fcb
2 changed files with 4 additions and 1 deletions

View file

@ -994,6 +994,9 @@ export class GeoOperations {
* @param meters
*/
public static distanceToHuman(meters: number): string {
if (meters === undefined) {
return ""
}
meters = Math.round(meters)
if (meters < 1000) {
return meters + "m"