[release-11.6.7] GenAI: Fix uncaught error when panel title is missing (#112283)

This commit is contained in:
grafana-delivery-bot[bot]
2025-10-10 13:47:46 +00:00
committed by GitHub
parent e4eecd4f6e
commit 597e1afde2
@@ -164,9 +164,7 @@ export const DASHBOARD_NEED_PANEL_TITLES_AND_DESCRIPTIONS_MESSAGE =
export function getPanelStrings(dashboard: DashboardModel): string[] {
const panelStrings = dashboard.panels
.filter(
(panel) =>
(panel.title.length > 0 && panel.title !== NEW_PANEL_TITLE) ||
(panel.description && panel.description.length > 0)
(panel) => (panel.title && panel.title !== NEW_PANEL_TITLE) || (panel.description && panel.description.length > 0)
)
.map(getPanelString);