From a1e39ffd2a711b6eb3129c497b2e2b11f059e429 Mon Sep 17 00:00:00 2001 From: Karl Haworth Date: Fri, 5 Apr 2024 10:38:42 -0400 Subject: [PATCH] update for the return type tweak Signed-off-by: Karl Haworth --- .../ApolloExplorerBrowser.tsx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx index 7cb6957aae..680e3964ca 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerBrowser/ApolloExplorerBrowser.tsx @@ -84,7 +84,9 @@ export const handleAuthRequest = ({ ...options, headers: { ...options.headers, - Authorization: `Bearer ${await authCallback()}`, + ...(authCallback && { + Authorization: `Bearer ${await authCallback()}`, + }), }, ...cookies, }); @@ -112,14 +114,10 @@ export const ApolloExplorerBrowser = ({ endpoints, authCallback }: Props) => {