Closed markstos closed 10 years ago
Example:
console.log( addressit("18 E. Main St"));
Returns an 'region' of: ['']
['']
Since there's no match, I would expect it to return an empty array instead.
So, if you want to check to see if there's a region match, it should be as easy as:
if (addrParts.regions.length) { ... }
Currently, additional work is required to filter out the empty string case .
I'm looking at patch for this now.
Thanks heaps for making the patch. Was great tracking emails where an issue was reported, patched and a PR issued all while I was asleep :)
Example:
Returns an 'region' of:
['']
Since there's no match, I would expect it to return an empty array instead.
So, if you want to check to see if there's a region match, it should be as easy as:
Currently, additional work is required to filter out the empty string case .