mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Null check.
This commit is contained in:
parent
fb3536c352
commit
91e004ebfb
1 changed files with 1 additions and 1 deletions
|
|
@ -111,7 +111,7 @@ export function Chart({
|
|||
} else {
|
||||
const { index } = item;
|
||||
const meta = chart.current.getDatasetMeta(0);
|
||||
const hidden = !!meta.data[index].hidden;
|
||||
const hidden = !!meta?.data?.[index]?.hidden;
|
||||
|
||||
meta.data[index].hidden = !hidden;
|
||||
chart.current.legend.legendItems[index].hidden = !hidden;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue