Metastring / health-heatmap-ui

Health Heatmap UI - Built with React, Redux, Webpack, Mapbox
0 stars 1 forks source link

"layers is undefined" when navigating to composite page from map/idsp page #22

Open asdofindia opened 4 years ago

asdofindia commented 4 years ago

There are two externalLayers console logged when loading the composite page, followed by an error "c is undefined" which on development is layer is undefined.

This happens because there is an attempt to render the layer before the layers have been fetched from geoserver. In the race between getGeoserverLayers in sidebar and toggleExternalLayers, getGeoserverLayers always loses because it is a network call.