From c7f0335d961bbd200e57bf73281133ca323de060 Mon Sep 17 00:00:00 2001 From: Rinku Chaudhari <76877078+therealrinku@users.noreply.github.com> Date: Sat, 24 Aug 2024 01:40:49 +0545 Subject: [PATCH] fix: response headers count logic update (#1488) --- packages/bruno-app/src/components/ResponsePane/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/bruno-app/src/components/ResponsePane/index.js b/packages/bruno-app/src/components/ResponsePane/index.js index 02edc106e..f0df42e3e 100644 --- a/packages/bruno-app/src/components/ResponsePane/index.js +++ b/packages/bruno-app/src/components/ResponsePane/index.js @@ -97,6 +97,8 @@ const ResponsePane = ({ rightPaneWidth, item, collection }) => { }); }; + const responseHeadersCount = typeof response.headers === 'object' ? Object.entries(response.headers).length : 0; + return (
@@ -105,7 +107,7 @@ const ResponsePane = ({ rightPaneWidth, item, collection }) => {
selectTab('headers')}> Headers - {response.headers?.length > 0 && {response.headers.length}} + {responseHeadersCount > 0 && {responseHeadersCount}}
selectTab('timeline')}> Timeline