Skip to content

Commit

Permalink
#1532 - fix default bearer token being 'undefined'
Browse files Browse the repository at this point in the history
  • Loading branch information
lowi-exxeta committed Feb 7, 2024
1 parent 1900bdd commit 596d68f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 596d68f

Please sign in to comment.