deduplicate postcode suggestions (#10847)

This commit is contained in:
Chaitanya Kadu
2025-03-07 17:34:21 +05:30
committed by GitHub
parent 89af80057b
commit 3fa84a2abc

View File

@@ -114,9 +114,10 @@ export function uiFieldAddress(field, context) {
}
function getNearPostcodes() {
return [... new Set([]
const postcodes = []
.concat(getNearValues('postcode'))
.concat(getNear(d => d.tags.postal_code, 'postcode', 200, 'postal_code')))];
.concat(getNear(d => d.tags.postal_code, 'postcode', 200, 'postal_code'));
return utilArrayUniqBy(postcodes, item => item.value);
}
function getNearValues(key) {