From f6d8777450055ca54075cefc69a8c91ed249114c Mon Sep 17 00:00:00 2001 From: Hebi Li Date: Wed, 3 May 2023 02:58:22 -0700 Subject: [PATCH] fix getAuthHeaders typing (#259) --- ui/src/lib/auth.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/lib/auth.tsx b/ui/src/lib/auth.tsx index 998611b3..8b0c8232 100644 --- a/ui/src/lib/auth.tsx +++ b/ui/src/lib/auth.tsx @@ -40,8 +40,8 @@ function useProvideAuth() { ); }, []); - const getAuthHeaders = () => { - if (!authToken) return null; + const getAuthHeaders = (): Record => { + if (!authToken) return {}; return { authorization: `Bearer ${authToken}`,