From 6c67b2e40e56d3e32cb4a4e64e3e34ccddd0af63 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 2 Feb 2024 18:15:25 +0900 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=E3=83=81=E3=83=A3=E3=83=BC?= =?UTF-8?q?=E3=83=88=E3=81=AElegend=E3=81=8C=E3=82=AF=E3=83=AA=E3=83=83?= =?UTF-8?q?=E3=82=AF=E3=81=AB=E5=8F=8D=E5=BF=9C=E3=81=97=E3=81=AA=E3=81=84?= =?UTF-8?q?=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit これにより発生 https://github.com/misskey-dev/misskey/pull/12926 --- packages/frontend/src/components/MkChartLegend.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/MkChartLegend.vue b/packages/frontend/src/components/MkChartLegend.vue index 110eeca5db..d2b06675ba 100644 --- a/packages/frontend/src/components/MkChartLegend.vue +++ b/packages/frontend/src/components/MkChartLegend.vue @@ -30,9 +30,9 @@ function onClick(item: LegendItem) { if (chart.value == null) return; if (type.value === 'pie' || type.value === 'doughnut') { // Pie and doughnut charts only have a single dataset and visibility is per item - if (item.index) chart.value.toggleDataVisibility(item.index); + if (item.index != null) chart.value.toggleDataVisibility(item.index); } else { - if (item.datasetIndex) chart.value.setDatasetVisibility(item.datasetIndex, !chart.value.isDatasetVisible(item.datasetIndex)); + if (item.datasetIndex != null) chart.value.setDatasetVisibility(item.datasetIndex, !chart.value.isDatasetVisible(item.datasetIndex)); } chart.value.update(); }