From cba60dca7939e72ca36fa4db0c2fdf817ef182fa Mon Sep 17 00:00:00 2001 From: Greg Starr Date: Tue, 8 Jan 2019 11:20:19 -0700 Subject: [PATCH] Add check for undefined location property. --- packages/arcgis-rest-geocoder/src/bulk.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/arcgis-rest-geocoder/src/bulk.ts b/packages/arcgis-rest-geocoder/src/bulk.ts index 1d92b3c6fa..af3ef3190a 100644 --- a/packages/arcgis-rest-geocoder/src/bulk.ts +++ b/packages/arcgis-rest-geocoder/src/bulk.ts @@ -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; });