mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 01:46:07 +00:00
treat optional point
This commit is contained in:
parent
83b6a553f3
commit
b3bb91bd20
@ -19,7 +19,7 @@ export function Location2Point(location: Location): Point {
|
||||
|
||||
export function Point2Location(point: Point): Location {
|
||||
const location = new Location()
|
||||
if (point.type === 'Point' && point.coordinates.length === 2) {
|
||||
if (point?.type === 'Point' && point?.coordinates.length === 2) {
|
||||
location.longitude = point.coordinates[0]
|
||||
location.latitude = point.coordinates[1]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user