Fix share location crash if a device is not connected

This commit is contained in:
Garth Vander Houwen 2023-01-27 09:04:05 -08:00
parent ece4045085
commit 4cb96b827a

View file

@ -103,7 +103,10 @@ struct AppSettings: View {
self.bleManager.context = context
}
.onChange(of: userSettings.provideLocation) { newProvideLocation in
self.bleManager.sendWantConfig()
if bleManager.connectedPeripheral != nil {
self.bleManager.sendWantConfig()
}
}
}
}