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

Loading…
Cancel
Save