diff --git a/ui/src/components/EntryDetailed.tsx b/ui/src/components/EntryDetailed.tsx index 5c7045d6f..538550c7b 100644 --- a/ui/src/components/EntryDetailed.tsx +++ b/ui/src/components/EntryDetailed.tsx @@ -41,7 +41,7 @@ const EntryTitle: React.FC = ({protocol, data, bodySize, elapsedTime}) => {
{response.payload &&
{formatSize(bodySize)}
} -
{Math.round(elapsedTime)}ms
+ {response.payload &&
{Math.round(elapsedTime)}ms
}
; }; diff --git a/ui/src/components/EntryDetailed/EntryViewer.tsx b/ui/src/components/EntryDetailed/EntryViewer.tsx index 9271a0f47..becae4d56 100644 --- a/ui/src/components/EntryDetailed/EntryViewer.tsx +++ b/ui/src/components/EntryDetailed/EntryViewer.tsx @@ -54,6 +54,10 @@ const AutoRepresentation: React.FC = ({representation, rulesMatched, elapse const {request, response} = JSON.parse(representation); + if (!response) { + TABS[1]['hidden'] = true; + } + return
{
@@ -63,7 +67,7 @@ const AutoRepresentation: React.FC = ({representation, rulesMatched, elapse {currentTab === TABS[0].tab && } - {currentTab === TABS[1].tab && + {response && currentTab === TABS[1].tab && } {currentTab === TABS[2].tab &&