Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/sitemap/[entityPage]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import {
} from '@/lib/sitemap-utils';

interface EntityItem {
id: string;
// AIModel ids are GraphQL Int; every other entity's are strings.
id: string | number;
slug?: string;
name?: string;
fullName?: string;
Expand All @@ -25,7 +26,7 @@ function isEntityItem(item: unknown): item is EntityItem {
typeof item === 'object' &&
item !== null &&
'id' in item &&
typeof (item as { id: unknown }).id === 'string'
['string', 'number'].includes(typeof (item as { id: unknown }).id)
);
}

Expand Down
Loading