fix: handle undefined githubStars in tool detail page
Use loose equality (!=) instead of strict equality (!==) to check for both null and undefined values. This prevents runtime TypeError when githubStars is undefined. Fixes: Cannot read properties of undefined (reading 'toLocaleString') 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
f6514314c0
commit
77e7eedbe0
1 changed files with 1 additions and 1 deletions
|
|
@ -419,7 +419,7 @@ export default function ToolDetailPage({
|
|||
{tool.npmDownloadsLastMonth?.toLocaleString() || '0'}
|
||||
</p>
|
||||
</div>
|
||||
{tool.githubStars !== null && (
|
||||
{tool.githubStars != null && (
|
||||
<div>
|
||||
<p className="text-sm text-foreground-secondary mb-1">GitHub Stars</p>
|
||||
<p className="text-2xl font-bold text-foreground">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue