fix: handle undefined npmKeywords in tool detail page

Add null check before accessing npmKeywords.length to prevent
runtime TypeError when npmKeywords is undefined.

Fixes: Cannot read properties of undefined (reading 'length')

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ajax Davis 2025-12-04 17:14:20 +10:00
parent 77e7eedbe0
commit b9269c5574

View file

@ -446,7 +446,7 @@ export default function ToolDetailPage({
</Card>
{/* NPM Keywords */}
{tool.npmKeywords.length > 0 && (
{tool.npmKeywords && tool.npmKeywords.length > 0 && (
<Card>
<CardHeader>
<CardTitle>NPM Keywords</CardTitle>