Skip to content

Commit

Permalink
Handle github star errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-ssg committed Feb 27, 2025
1 parent 27a69a9 commit 965938f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/web/components/GithubStar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ const GithubStar: FC<GithubStarType> = ({}) => {
fetch('https://api.github.com/repos/flagsmith/flagsmith')
.then((res) => res.json())
.then((res) => {
setStars(res.stargazers_count)
if (res.stargazers_count) {
setStars(res.stargazers_count)
}
})
.catch(() => {})
}
Expand Down

0 comments on commit 965938f

Please sign in to comment.