Dashboard: Fix Drawer validation to avoid errors with empty request objects (#68214)

This commit is contained in:
Alexa V
2023-05-11 10:59:50 +02:00
committed by GitHub
parent b10b290213
commit c025783367
2 changed files with 4 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
import { isEmpty } from 'lodash';
import React, { useState } from 'react';
import { CoreApp, DataSourceApi, formattedValueToString, getValueFormat, PanelData, PanelPlugin } from '@grafana/data';
@@ -114,7 +115,8 @@ export const InspectContent = ({
function formatStats(data: PanelData) {
const { request } = data;
if (!request) {
if (!request || isEmpty(request)) {
return '';
}