From 965938f97ad7ea356e11d87fd34c9e64b7730442 Mon Sep 17 00:00:00 2001 From: kyle-ssg Date: Thu, 27 Feb 2025 14:41:22 +0000 Subject: [PATCH] Handle github star errors --- 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(() => {}) }