mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
PieChart: Handle undefined custom.hideFrom in fieldConfig (#34185)
This commit is contained in:
parent
7a2dff741b
commit
5a43bd4581
@ -76,7 +76,7 @@ function getLegend(props: Props, displayValues: FieldDisplay[]) {
|
|||||||
}
|
}
|
||||||
const total = displayValues
|
const total = displayValues
|
||||||
.filter((item) => {
|
.filter((item) => {
|
||||||
return !item.field.custom.hideFrom.viz;
|
return !item.field.custom?.hideFrom?.viz;
|
||||||
})
|
})
|
||||||
.reduce((acc, item) => item.display.numeric + acc, 0);
|
.reduce((acc, item) => item.display.numeric + acc, 0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user