mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-21 07:46:58 +02:00
fix logic bug, make condition more readable
This commit is contained in:
@@ -87,8 +87,11 @@ export function uiFieldAddress(field, context) {
|
||||
|
||||
function getNearPlaces() {
|
||||
function isAddressable(d) {
|
||||
return d.tags.name && d.tags.place ||
|
||||
d.tags.boundary === 'administrative' && d.tags.admin_level >= 8;
|
||||
if (d.tags.name) {
|
||||
if (d.tags.place) return true;
|
||||
if (d.tags.boundary === 'administrative' && d.tags.admin_level >= 8) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return getNear(isAddressable, 'place', 200);
|
||||
|
||||
Reference in New Issue
Block a user