Browse Source

removing an outrageous if condition

pull/169/head
Harish Krishna 10 years ago
parent
commit
13e9aadeaf
  1. 15
      query/search.js

15
query/search.js

@ -84,16 +84,15 @@ function generate( params ){
admin_fields.push('admin0', 'alpha3'); admin_fields.push('admin0', 'alpha3');
} }
if (params.parsed_input.regions) { var input_regions = params.parsed_input.regions ? params.parsed_input.regions.join(' ') : '';
var input_regions = params.parsed_input.regions.join(' '); if (admin_fields.length === 5 && input_regions !== params.input) {
if (admin_fields.length === 5 && input_regions !== params.input) { if (params.parsed_input.admin_parts) {
if (params.parsed_input.admin_parts) { qb(admin_fields, params.parsed_input.admin_parts);
qb(admin_fields, params.parsed_input.admin_parts); } else {
} else { qb(admin_fields, input_regions);
qb(admin_fields, input_regions);
}
} }
} }
} }
// add search condition to distance query // add search condition to distance query

Loading…
Cancel
Save