codex suggested fix: explicit check if contact location is not null

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
chore/offband-rebrand
ericszimmermann 4 months ago committed by Enot (ded) Skelly
parent 8386f262e1
commit e4684b585a
No known key found for this signature in database
GPG Key ID: 2FE5B19B03656304

@ -87,7 +87,7 @@ Contact? getRepeaterPrefixMatchNearLocation(
var bestDistance = double.infinity;
for (final c in candidates) {
if (c.hasLocation) {
if (c.hasLocation && c.latitude != null && c.longitude != null) {
final d = distance(searchPoint, LatLng(c.latitude!, c.longitude!));
if (d < bestDistance) {
bestDistance = d;

Loading…
Cancel
Save

Powered by TurnKey Linux.