Secure from custom config being undefined in PlotLegend (#34975)

This commit is contained in:
Dominik Prokop
2021-05-31 19:37:34 +02:00
committed by GitHub
parent aba1801193
commit 823581add8
@@ -35,7 +35,7 @@ export const PlotLegend: React.FC<PlotLegendProps> = ({
const field = data[fieldIndex.frameIndex]?.fields[fieldIndex.fieldIndex];
if (!field || field.config.custom.hideFrom?.legend) {
if (!field || field.config.custom?.hideFrom?.legend) {
return undefined;
}