Table: Don't error if first frame is field-less (empty response) (#89867)

This commit is contained in:
Leon Sorokin 2024-06-27 18:58:49 -05:00 committed by GitHub
parent b7d5587018
commit c2cd32ab64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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];