Skip to content

Commit

Permalink
fix: 🐛 Fix nullish coalescing operator issue in hasCustomAuthorizatio…
Browse files Browse the repository at this point in the history
…nHeader

fixes the following bug : The left operand of the "??" operator here will never be null or undefined, so it will always be returned.

#1338
  • Loading branch information
raghavyuva committed Dec 23, 2024
1 parent 651ff12 commit e8cffda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SupabaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
}

Expand Down

0 comments on commit e8cffda

Please sign in to comment.