From e8cffdad0d405a27dece8cbb836e9ab00f86fe3e Mon Sep 17 00:00:00 2001 From: raghavyuva Date: Mon, 23 Dec 2024 14:03:39 +0530 Subject: [PATCH] fix: :bug: Fix nullish coalescing operator issue in hasCustomAuthorizationHeader fixes the following bug : The left operand of the "??" operator here will never be null or undefined, so it will always be returned. #1338 --- src/SupabaseClient.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SupabaseClient.ts b/src/SupabaseClient.ts index 20ec9183..e39751de 100644 --- a/src/SupabaseClient.ts +++ b/src/SupabaseClient.ts @@ -308,7 +308,7 @@ export default class SupabaseClient< fetch, // auth checks if there is a custom authorizaiton header using this flag // so it knows whether to return an error when getUser is called with no session - hasCustomAuthorizationHeader: 'Authorization' in this.headers ?? false, + hasCustomAuthorizationHeader: 'Authorization' in this.headers, }) }