From 596d68f0c9bfec1ef0bdd49aed4a7b2626aa8707 Mon Sep 17 00:00:00 2001 From: "Wilke, Louis" Date: Wed, 7 Feb 2024 11:21:36 +0100 Subject: [PATCH] #1532 - fix default bearer token being 'undefined' --- .../src/components/RequestPane/Auth/BearerAuth/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/bruno-app/src/components/RequestPane/Auth/BearerAuth/index.js b/packages/bruno-app/src/components/RequestPane/Auth/BearerAuth/index.js index d839d62060..c5c8b5c368 100644 --- a/packages/bruno-app/src/components/RequestPane/Auth/BearerAuth/index.js +++ b/packages/bruno-app/src/components/RequestPane/Auth/BearerAuth/index.js @@ -11,9 +11,8 @@ const BearerAuth = ({ item, collection }) => { const dispatch = useDispatch(); const { storedTheme } = useTheme(); - const bearerToken = item.draft - ? get(item, 'draft.request.auth.bearer.token') - : get(item, 'request.auth.bearer.token'); + const bearerToken = + (item.draft ? get(item, 'draft.request.auth.bearer.token') : get(item, 'request.auth.bearer.token')) ?? ''; const handleRun = () => dispatch(sendRequest(item, collection.uid)); const handleSave = () => dispatch(saveRequest(item.uid, collection.uid));