From cb9118627693d41bcffdc4558a416c06a4ff0935 Mon Sep 17 00:00:00 2001 From: Bogdan Matei Date: Fri, 10 Oct 2025 16:20:48 +0300 Subject: [PATCH] GenAI: Fix uncaught error when panel title is missing (#112277) --- public/app/features/dashboard/components/GenAI/utils.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/public/app/features/dashboard/components/GenAI/utils.ts b/public/app/features/dashboard/components/GenAI/utils.ts index ffc3740b57c..ea1a8fe425b 100644 --- a/public/app/features/dashboard/components/GenAI/utils.ts +++ b/public/app/features/dashboard/components/GenAI/utils.ts @@ -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);