mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-08 09:43:23 +10:00
fix: correct location validation and clean up target contact handling
- Fix asymmetric lat/lon validation in _handleContactAdvert (was checking longitude != 0 for latitude; now uses (latitude != 0 || longitude != 0) for both) - Remove duplicate targetGuessed assignment in path_trace_map - Rename public target field to private _targetContact, use local variable to avoid unnecessary null-aware operators Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4757,14 +4757,14 @@ class MeshCoreConnector extends ChangeNotifier {
|
||||
hasLocation &&
|
||||
latitude != null &&
|
||||
latitude.abs() <= 90 &&
|
||||
longitude != 0
|
||||
(latitude != 0 || longitude != 0)
|
||||
? latitude
|
||||
: existing.latitude,
|
||||
longitude:
|
||||
hasLocation &&
|
||||
longitude != null &&
|
||||
longitude.abs() <= 180 &&
|
||||
longitude != 0
|
||||
(latitude != 0 || longitude != 0)
|
||||
? longitude
|
||||
: existing.longitude,
|
||||
name: hasName ? name : existing.name,
|
||||
|
||||
Reference in New Issue
Block a user