Geomap: hide legend for markers with single threshold (#38734)

This commit is contained in:
Ryan McKinley
2021-08-30 23:22:19 -07:00
committed by GitHub
parent 8e2ee0a1c8
commit f567bef0bf

View File

@@ -52,8 +52,8 @@ export function MarkersLegend(props: MarkersLegendProps) {
}
const thresholds = color.field?.config?.thresholds;
if (!thresholds) {
return <div className={style.infoWrap}>no thresholds????</div>;
if (!thresholds || thresholds.steps.length < 2) {
return <div></div>; // don't show anything in the legend
}
return (