aboutsummaryrefslogtreecommitdiff
path: root/src/constants.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/constants.ts')
-rw-r--r--src/constants.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/constants.ts b/src/constants.ts
index 9699e57..dcb9acf 100644
--- a/src/constants.ts
+++ b/src/constants.ts
@@ -40,7 +40,7 @@ async function fetchGithubApi(method: string, route: string, headers?: any, json
githubApiBase + route,
{
agent: () => httpsAgent,
- body: json ? JSON.stringify(json) : null,
+ body: json ? JSON.stringify(json) : undefined,
method,
headers: Object.assign({
'Authorization': `token ${process.env.github_token}`
@@ -78,7 +78,7 @@ function fetchFile(path: string): Promise<GithubFile> {
return new Promise(resolve => {
queue.enqueue(async() => {
if (fileCache.has(path))
- return resolve(fileCache.get(path))
+ return resolve(fileCache.get(path)!)
const r = await fetchGithubApi(
'GET',