Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions query/address_search_using_ids.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ function generateQuery( clean, res ){
vs.var( 'input:street', clean.parsed_text.street );

// find the first granularity band for which there are results
const granularity_band = granularity_bands.find(band => anyResultsAtGranularityBand(results, band));
let granularity_band = granularity_bands.find(band => anyResultsAtGranularityBand(results, band));

// special case: if locality is present in the band, also include macrocounty
// this is used to cover the Greater Syndey Area
if (granularity_band && granularity_band.includes('locality')) {
granularity_band.push('macrocounty');
granularity_band = [...granularity_band, 'macrocounty'];
}

// if there's a granularity band, accumulate the ids from each layer in the band
Expand Down