Skip to content

Commit

Permalink
Add check for undefined location property.
Browse files Browse the repository at this point in the history
  • Loading branch information
gcstarr authored Jan 8, 2019
1 parent b84bad2 commit cba60dc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/arcgis-rest-geocoder/src/bulk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ export function bulkGeocode(
).then(response => {
const sr = response.spatialReference;
response.locations.forEach(function(address: { location: IPoint }) {
address.location.spatialReference = sr;
if (address.location) {
address.location.spatialReference = sr;
}
});
return response;
});
Expand Down

0 comments on commit cba60dc

Please sign in to comment.