Skip to content

Commit

Permalink
Prevent undefined issue
Browse files Browse the repository at this point in the history
  • Loading branch information
aminlatifi committed Oct 22, 2024
1 parent 2ec5ad1 commit 14073e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export async function bootstrap() {
const { headers } = req;
const authVersion = headers?.authversion || '1';
if (headers?.authorization) {
token = headers.authorization?.split(' ')[1].toString();
token = headers.authorization?.split(' ')[1]?.toString();
if (!token) {
throw new Error('Authorization token is missing');
}
Expand Down

0 comments on commit 14073e5

Please sign in to comment.