From 08312897c8bb275ae29609e2d7681ec74bd236a7 Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Sun, 24 Jan 2021 08:58:18 -0800 Subject: [PATCH] XY Chart: fix editor error with empty frame (no fields) (#30573) --- public/app/plugins/panel/xychart/XYDimsEditor.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/panel/xychart/XYDimsEditor.tsx b/public/app/plugins/panel/xychart/XYDimsEditor.tsx index 51c38f9a38a..da0cf0d4540 100644 --- a/public/app/plugins/panel/xychart/XYDimsEditor.tsx +++ b/public/app/plugins/panel/xychart/XYDimsEditor.tsx @@ -28,7 +28,7 @@ export const XYDimsEditor: FC { - if (context.data && context.data.length > 0) { + if (context?.data?.length) { return context.data.map((f, idx) => ({ value: idx, label: getFrameDisplayName(f, idx), @@ -56,7 +56,7 @@ export const XYDimsEditor: FC