Browse Source

check yoself before you wreck yoself

pull/169/head
Harish Krishna 10 years ago
parent
commit
e149fed273
  1. 14
      query/search.js

14
query/search.js

@ -84,12 +84,14 @@ function generate( params ){
admin_fields.push('admin0', 'alpha3');
}
var input_regions = params.parsed_input.regions.join(' ');
if (admin_fields.length === 4 && input_regions !== params.input) {
if (params.parsed_input.admin_parts) {
qb(admin_fields, params.parsed_input.admin_parts);
} else {
qb(admin_fields, input_regions);
if (params.parsed_input.regions) {
var input_regions = params.parsed_input.regions.join(' ');
if (admin_fields.length === 4 && input_regions !== params.input) {
if (params.parsed_input.admin_parts) {
qb(admin_fields, params.parsed_input.admin_parts);
} else {
qb(admin_fields, input_regions);
}
}
}
}

Loading…
Cancel
Save