I'm trying to call the updateFeature() method on a FeatureLayer (Esri Leflet v2.2.3 and Leaflet JS v1.3.1). Although the operation is actually successful, I'm getting this console error:
FeatureLayer.js:156 Uncaught TypeError: Cannot read property 'removeLayer' of undefined
at e.removeLayers (FeatureLayer.js:156)
at e.<anonymous> (FeatureManager.js:531)
at e.<anonymous> (FeatureLayerService.js:54)
at e.<anonymous> (Service.js:98)
at XMLHttpRequest.s.onreadystatechange (Request.js:75)
The biggest problem with this is that this error isn't allowing me to resolve or reject the Promise because nothing comes back for error or response in the callback. Any thoughts on what is causing this or how I can work around it?
It seems that recreating my feature layer that's being updated somehow makes the new data available to Esri Leaflet to do its removeLayer business. Still not sure of the root cause but I'll update here if any more information is discovered.