Skip to content

Commit

Permalink
stop unwrapping nuilable positon
Browse files Browse the repository at this point in the history
  • Loading branch information
garthvh committed Sep 6, 2024
1 parent 2788cae commit 8954b21
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Meshtastic/Views/Nodes/Helpers/Map/NodeMapSwiftUI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8954b21

Please sign in to comment.