Skip to content

Commit

Permalink
fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchuman committed Feb 23, 2025
1 parent 3ee9dd5 commit 3b7729d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/lib/processMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ export default async function processMetadata(
alternates: {
canonical: url,
languages: Object.fromEntries(
page.translations?.map(({ language, slug }) => [
language,
[BASE_URL, language !== DEFAULT_LANG && language, slug]
page.translations?.map((t) => [
t?.language,
[BASE_URL, t?.language !== DEFAULT_LANG && t?.language, t?.slug]
.filter(Boolean)
.join('/'),
]) || [],
Expand Down
2 changes: 1 addition & 1 deletion src/types/Sanity.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ declare global {
readonly language?: string
translations?: {
slug: string
language: string
language?: string
}[]
}

Expand Down

0 comments on commit 3b7729d

Please sign in to comment.