diff --git a/src/panels/corpglory-dataexporter-panel/components/Panel.tsx b/src/panels/corpglory-dataexporter-panel/components/Panel.tsx index f5e31ce..6bcf69f 100644 --- a/src/panels/corpglory-dataexporter-panel/components/Panel.tsx +++ b/src/panels/corpglory-dataexporter-panel/components/Panel.tsx @@ -114,8 +114,9 @@ export function Panel({ width, height, timeRange, eventBus, timeZone }: Props) { console.warn(`Can't update queries if there is no dashboard or datasources`); return; } + + const queries: DashboardQuery[] = []; dashboard.panels?.forEach((panel: PanelModel) => { - const queries: DashboardQuery[] = []; // @ts-ignore if (panel.type === PANEL_ID) { @@ -133,9 +134,8 @@ export function Panel({ width, height, timeRange, eventBus, timeZone }: Props) { } queries.push({ selected: false, target, panel, datasource }); }); - - setQueries(queries); }); + setQueries(queries); } function fetchTasks(): void {