From 8954b21faa15b212e66350621e51f12eb89f428b Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Fri, 6 Sep 2024 09:21:40 -0700 Subject: [PATCH] stop unwrapping nuilable positon --- Meshtastic/Views/Nodes/Helpers/Map/NodeMapSwiftUI.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Meshtastic/Views/Nodes/Helpers/Map/NodeMapSwiftUI.swift b/Meshtastic/Views/Nodes/Helpers/Map/NodeMapSwiftUI.swift index 7906f8b5c..14df39860 100644 --- a/Meshtastic/Views/Nodes/Helpers/Map/NodeMapSwiftUI.swift +++ b/Meshtastic/Views/Nodes/Helpers/Map/NodeMapSwiftUI.swift @@ -130,7 +130,9 @@ struct NodeMapSwiftUI: View { if node.positions?.count ?? 0 > 1 { position = .automatic } else { - position = .camera(MapCamera(centerCoordinate: mostRecent!.coordinate, distance: 8000, heading: 0, pitch: 60)) + if let mr = mostRecent?.coordinate { + position = .camera(MapCamera(centerCoordinate: mr.coordinate, distance: 8000, heading: 0, pitch: 60)) + } } if self.scene == nil { Task {