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.
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.