Skip to content

Commit

Permalink
Fix console errors by making a function less strict
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Nov 12, 2020
1 parent 2da5b72 commit 3caa8c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/features/ci-link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion source/github-helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit 3caa8c8

Please sign in to comment.