Handle nil emoji

This commit is contained in:
Garth Vander Houwen 2026-04-05 09:08:27 -07:00
parent 4b847b6b08
commit 8978fce157

View file

@ -166,10 +166,8 @@ struct WaypointForm: View {
newWaypoint.longitudeI = waypoint.longitudeI
newWaypoint.name = name.count > 0 ? name : "Dropped Pin"
newWaypoint.description_p = description
// Unicode scalar value for the icon emoji string
let unicodeScalers = icon.unicodeScalars
// First element as an UInt32
let unicode = unicodeScalers[unicodeScalers.startIndex].value
let unicode = unicodeScalers.first?.value ?? 128205
newWaypoint.icon = unicode
if locked {
if lockedTo == 0 {