From 137b47ccbdad5fb5ffe55bc46d0f69a4d7042f00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 8 Apr 2020 13:49:35 +0200 Subject: [PATCH] NewPanelEdit: Minor fixes (#23425) --- .../dashboard/components/PanelEditor/PanelOptionsTab.tsx | 4 +++- .../dashboard/components/PanelEditor/state/actions.ts | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/public/app/features/dashboard/components/PanelEditor/PanelOptionsTab.tsx b/public/app/features/dashboard/components/PanelEditor/PanelOptionsTab.tsx index c7ef6562fdb..11d7b5513ff 100644 --- a/public/app/features/dashboard/components/PanelEditor/PanelOptionsTab.tsx +++ b/public/app/features/dashboard/components/PanelEditor/PanelOptionsTab.tsx @@ -85,7 +85,9 @@ export const PanelOptionsTab: FC = ({ } if (plugin.angularPanelCtrl) { - elements.push(); + elements.push( + + ); } elements.push( diff --git a/public/app/features/dashboard/components/PanelEditor/state/actions.ts b/public/app/features/dashboard/components/PanelEditor/state/actions.ts index 56a4ea8c85f..71043d3aa1d 100644 --- a/public/app/features/dashboard/components/PanelEditor/state/actions.ts +++ b/public/app/features/dashboard/components/PanelEditor/state/actions.ts @@ -54,7 +54,10 @@ export function panelEditorCleanUp(): ThunkResult { // Resend last query result on source panel query runner // But do this after the panel edit editor exit process has completed setTimeout(() => { - sourcePanel.getQueryRunner().pipeDataToSubject(panel.getQueryRunner().getLastResult()); + const lastResult = panel.getQueryRunner().getLastResult(); + if (lastResult) { + sourcePanel.getQueryRunner().pipeDataToSubject(lastResult); + } }, 20); }