fix(plugin/chart/parallel-coordinate): prevent frontend crash with empty/undefined metrics when moving between pages quickly (#42392)

Signed-off-by: hainenber <dotronghai96@gmail.com>
This commit is contained in:
Đỗ Trọng Hải
2026-08-24 11:44:50 -07:00
committed by GitHub
parent bf5f3a9e6b
commit b0962ba5ed
2 changed files with 42 additions and 1 deletions
@@ -38,7 +38,7 @@ export default function transformProps(chartProps: ChartProps) {
includeSeries,
isDarkMode: isThemeDark(theme),
linearColorScheme,
metrics: metrics.map((m: { label?: string } | string) =>
metrics: (metrics ?? []).map((m: { label?: string } | string) =>
typeof m === 'string' ? m : m.label || m,
),
colorMetric: secondaryMetric?.label || secondaryMetric,