Skip to content

Commit 0fa3c3e

Browse files
committed
fix(auth): revert lint autofix that broke hasExternalApiCredentials return type
Biome auto-fixed `return auth !== null && auth.startsWith(...)` to `return auth?.startsWith(...)` which returns `boolean | undefined`, not `boolean`, causing a TypeScript build failure.
1 parent c52698d commit 0fa3c3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/sim/lib/auth/hybrid.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const BEARER_PREFIX = 'Bearer '
2525
export function hasExternalApiCredentials(headers: Headers): boolean {
2626
if (headers.has(API_KEY_HEADER)) return true
2727
const auth = headers.get('authorization')
28-
return auth?.startsWith(BEARER_PREFIX)
28+
return auth !== null && auth.startsWith(BEARER_PREFIX)
2929
}
3030

3131
export interface AuthResult {

0 commit comments

Comments
 (0)