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

(cherry picked from commit 823581add8)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
This commit is contained in:
Grot (@grafanabot) 2021-05-31 14:44:24 -04:00 committed by GitHub
parent 0b02a7e918
commit 8ba26e2f09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}