[release-11.5.10] GenAI: Fix uncaught error when panel title is missing (#112281)
GenAI: Fix uncaught error when panel title is missing (#112277)
(cherry picked from commit cb91186276)
Co-authored-by: Bogdan Matei <bogdan.matei@grafana.com>
This commit is contained in:
co-authored by
Bogdan Matei
parent
ad3d07f585
commit
5b5440c570
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user