Skip to content

Commit

Permalink
fix(doc-ui): Catch contributors fetch error (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
agoudbg authored Dec 17, 2024
1 parent e83b44e commit 45f3923
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/doc-ui/src/contributors/contributors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const fetchContributors = async (repo: string): Promise<Contributor[]> => {
} catch (error) {}
}

const response = await fetch(`https://api.github.com/repos/${repo}/contributors`);
if (!response.ok) {
const response = await fetch(`https://api.github.com/repos/${repo}/contributors`).catch(() => undefined);
if (!response?.ok) {
return [];
}

Expand Down

0 comments on commit 45f3923

Please sign in to comment.