Skip to content

Commit a78f0ee

Browse files
committed
fix: type
1 parent 83c5b0c commit a78f0ee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { sanitizeVersion } from './utils/versioning'
1010
declare global {
1111
const GITHUB_ACCOUNT: string
1212
const GITHUB_REPO: string
13-
const GITHUB_TOKEN: string | undefined
13+
const GITHUB_TOKEN: string
1414
}
1515

1616
const responses = {

src/services/github.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const getReleases = async (request: Request): Promise<Response> => {
88
'User-Agent': request.headers.get('User-Agent') as string,
99
})
1010

11-
if (GITHUB_TOKEN) headers.set('Authorization', `token ${GITHUB_TOKEN}`)
11+
if (GITHUB_TOKEN?.length) headers.set('Authorization', `token ${GITHUB_TOKEN}`)
1212

1313
return await fetch(reqUrl.toString(), {
1414
method: 'GET',

0 commit comments

Comments
 (0)