Certain layers in the LayerList Widget do not render a legend and instead say 'No Legend' after the user expands the Legend button. Enhance the LayerList Widget to remove or grey out the Legend button when No Legend exists to improve user experience.
For reference, still as of JS API 4.24, on https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html#hideLayersNot... it says:
Known Limitations