summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Federico Brigante <me@fregante.com> 2020-11-12 01:03:59 -0600
committerGravatar Federico Brigante <me@fregante.com> 2020-11-12 01:03:59 -0600
commit3caa8c8bdc4635bc53f61cc0e38182add2c828f3 (patch)
tree8f80bf1f28195856e0eeab1f0da1af78ba500aaf
parent2da5b723043863c5eba9af4e74517f038d9568e9 (diff)
downloadrefined-github-3caa8c8bdc4635bc53f61cc0e38182add2c828f3.tar.gz
refined-github-3caa8c8bdc4635bc53f61cc0e38182add2c828f3.tar.zst
refined-github-3caa8c8bdc4635bc53f61cc0e38182add2c828f3.zip
Fix console errors by making a function less strict
-rw-r--r--source/features/ci-link.tsx2
-rw-r--r--source/github-helpers/index.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/source/features/ci-link.tsx b/source/features/ci-link.tsx
index 77899474..8bc1305f 100644
--- a/source/features/ci-link.tsx
+++ b/source/features/ci-link.tsx
@@ -8,7 +8,7 @@ import fetchDom from '../helpers/fetch-dom';
import {buildRepoURL} from '../github-helpers';
// Look for the CI icon in the latest 2 days of commits #2990
-const getIcon = onetime(fetchDom.bind(null,
+const getIcon = onetime(async () => fetchDom(
buildRepoURL('commits'), [
'.commit-group:nth-of-type(-n+2) .commit-build-statuses', // Pre "Repository refresh" layout
'.TimelineItem--condensed:nth-of-type(-n+2) .commit-build-statuses'
diff --git a/source/github-helpers/index.ts b/source/github-helpers/index.ts
index 28b44b05..5b08dc55 100644
--- a/source/github-helpers/index.ts
+++ b/source/github-helpers/index.ts
@@ -48,7 +48,7 @@ export const buildRepoURL = (...pathParts: Array<string | number> & {0: string})
}
}
- return [location.origin, getRepo()!.nameWithOwner, ...pathParts].join('/');
+ return [location.origin, getRepo()?.nameWithOwner, ...pathParts].join('/');
};
export const getRepoGQL = (): string => {