From 721bba6bf512797c7e7bbbdb4a5cbd410e490a5e Mon Sep 17 00:00:00 2001 From: Kyle Johnson Date: Thu, 27 Feb 2025 14:47:18 +0000 Subject: [PATCH] fix: Handle github star errors (#5165) --- frontend/web/components/GithubStar.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/web/components/GithubStar.tsx b/frontend/web/components/GithubStar.tsx index c5ed8d76223a..0e22112e0695 100644 --- a/frontend/web/components/GithubStar.tsx +++ b/frontend/web/components/GithubStar.tsx @@ -25,7 +25,9 @@ const GithubStar: FC = ({}) => { 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(() => {}) }