From a8c090252a85a005c3df26304c7d7ebbfae567ba Mon Sep 17 00:00:00 2001 From: Harish Krishna Date: Fri, 17 Jul 2015 14:44:48 -0400 Subject: [PATCH] if the query has a number - search addresses --- sanitiser/_input.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sanitiser/_input.js b/sanitiser/_input.js index 131ad50e..b85d03a0 100644 --- a/sanitiser/_input.js +++ b/sanitiser/_input.js @@ -52,7 +52,7 @@ function sanitize( req ){ // address parsing parsedAddress1 = parser( params.input ); // set target_layer if input suggests no address - if (parsedAddress1.text === parsedAddress1.regions.join(' ')) { + if (parsedAddress1.text === parsedAddress1.regions.join(' ') && !hasNumber) { parsedAddress2.target_layer = get_layers(['admin', 'poi']); } // else { // this might be an overkill - you'd want to search for poi and admin