Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
7b3c099736
commit
87d11c2e6b
1 file changed
+5
-1
@@ -848,7 +848,11 @@ List<_PathHop> _buildPathHops(
|
|||||||
var bestDistance = double.infinity;
|
var bestDistance = double.infinity;
|
||||||
for (var j = 0; j < candidates.length; j++) {
|
for (var j = 0; j < candidates.length; j++) {
|
||||||
final candidate = candidates[j];
|
final candidate = candidates[j];
|
||||||
if (!candidate.hasLocation) continue;
|
if (!candidate.hasLocation ||
|
||||||
|
candidate.latitude == null ||
|
||||||
|
candidate.longitude == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
final currentDistance = distance(
|
final currentDistance = distance(
|
||||||
searchPoint,
|
searchPoint,
|
||||||
LatLng(candidate.latitude!, candidate.longitude!),
|
LatLng(candidate.latitude!, candidate.longitude!),
|
||||||
|
|||||||
Reference in new issue
Block a user