From d0b345ad6659275f522edff03fc5b9d64f19946d Mon Sep 17 00:00:00 2001 From: therealrinku Date: Wed, 31 Jan 2024 13:03:07 +0545 Subject: [PATCH] fix: response headers count logic update --- 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 02edc106ea..f0df42e3e3 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