From 52d476db05a9b308b7e79e78bae84ccb8bb76541 Mon Sep 17 00:00:00 2001 From: Leon Sorokin Date: Thu, 27 Jun 2024 18:58:49 -0500 Subject: [PATCH] Table: Don't error if first frame is field-less (empty response) (#89867) --- public/app/plugins/panel/table/TablePanel.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/plugins/panel/table/TablePanel.tsx b/public/app/plugins/panel/table/TablePanel.tsx index 4b0a386e6a9..1e27e99af32 100644 --- a/public/app/plugins/panel/table/TablePanel.tsx +++ b/public/app/plugins/panel/table/TablePanel.tsx @@ -26,7 +26,7 @@ export function TablePanel(props: Props) { ? migrateFromParentRowIndexToNestedFrames(data.series) : data.series; const count = frames?.length; - const hasFields = frames[0]?.fields.length; + const hasFields = frames.some((frame) => frame.fields.length > 0); const currentIndex = getCurrentFrameIndex(frames, options); const main = frames[currentIndex];