From c0c534dafb54ebf9f95a5054f576ad99de29f232 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Tue, 29 Jun 2021 17:52:00 -0500 Subject: enable strictNullChecks and fix all related issues (#65) --- src/constants.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/constants.ts') 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 { 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', -- cgit