Closed ajolipa closed 7 months ago
I believe that with the update to the PlaceMarkers
component this is no longer an issue; in the current version, the response from Core Data is being fed into the feature
or featureColleciton
function from turf
, which in the case that the geometry data passed in is null
will return an empty array of features. This will then fail the new check _.isEmpty(data?.features
and thus the component will return null
rather than trying to render the LocationMarkers
component. If that seems like reasonable/desired behavior, then I think this PR can be closed.
Closing (this is an older version of PR #269 ).
In this PR
Improves the error handling of the
PlaceMarker
component to simply returnnull
rather than throw page-breaking errors when the object fetched from Core Data has no value in thegeometry
field, addressing Issue #258 .Notes
For now the simplest seemed to be to just add this case to the check for the existence of overall
place
data. The behavior seems to be that since thePlaceMarker
component returnsnull
, the map simply renders as a world atlas with no place highlighted, which seems like reasonable default behavior to me but obviously could be modified further if desired.