Skip to content

Commit

Permalink
fix NaN if GITHUB_TOKEN is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
mandrasch committed Oct 25, 2024
1 parent 766980e commit f569383
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/RepoCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const repoData = await getRepoDetails(name)
className="w-4 h-4 inline-block relative"
style={{ top: "-1px" }}
/>{" "}
{parseInt(repoData.stargazers_count).toLocaleString("en-US")}
{parseInt(repoData.stargazers_count || 0).toLocaleString("en-US")}
</div>
</div>
<p class="mt-2 text-sm opacity-60 px-3 pt-1 pb-4">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/about.astro
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const releaseData = await getReleases()
<li class="p-6 lg:p-0">
<span class="text-5xl font-thin"
>{
parseInt(repoData.stargazers_count).toLocaleString("en-US")
parseInt(repoData.stargazers_count || 0).toLocaleString("en-US")
}</span
>
<span class="block font-mono text-sm">GitHub stars</span>
Expand Down

0 comments on commit f569383

Please sign in to comment.