Browse Source

used lodash.extend instead of extend module

pull/1015/head
Stephen Hess 7 years ago
parent
commit
1e003efe28
  1. 8
      sanitizer/_text_addressit.js

8
sanitizer/_text_addressit.js

@ -82,8 +82,8 @@ function parse(query) {
var addressWithAdminParts = getAdminPartsBySplittingOnDelim(queryParts);
var addressWithAddressParts= getAddressParts(queryParts.join(DELIM + ' '));
var parsedAddress = extend(addressWithAdminParts,
addressWithAddressParts);
// combine the 2 objects
_.extend(addressWithAdminParts, addressWithAddressParts);
var address_parts = [ 'name',
'number',
@ -99,8 +99,8 @@ function parse(query) {
var parsed_text = {};
address_parts.forEach(function(part){
if (parsedAddress[part]) {
parsed_text[part] = parsedAddress[part];
if (addressWithAdminParts[part]) {
parsed_text[part] = addressWithAdminParts[part];
}
});

Loading…
Cancel
Save