Skip to content

Commit

Permalink
Merge pull request #331 from hackforla/client/geomPoint-fix
Browse files Browse the repository at this point in the history
fixed issue where prod server returns hash for geomPoint
  • Loading branch information
jmensch1 committed Dec 20, 2020
2 parents c7a608a + c352ead commit 058d7ce
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions client/web/src/services/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ async function getJurisdiction(jurisdictionId) {
],
}

// fixes issue on prod where geomPoint was returned as a hash instead
// of an object
locations.forEach((location) => {
if (typeof location.geomPoint === 'string')
location.geomPoint = {
type: 'Point',
coordinates: [+location.geomLongitude, +location.geomLatitude],
}
})

return {
state,
jurisdiction,
Expand Down

0 comments on commit 058d7ce

Please sign in to comment.