Skip to content

Commit

Permalink
fix: make fullName/display name an empty string if null
Browse files Browse the repository at this point in the history
  • Loading branch information
clintonlunn committed Sep 14, 2024
1 parent b5682f0 commit 11b4038
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/hooks/seo/useUserProfileSeo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const useUserProfileSeo = ({ username = '', fullName = '', imageList = []
const author = `/u/${username}`
const count = imageList?.length ?? 0
const photoCountStr = `${count === 0 ? '' : count} Photo${count > 1 ? 's' : ''}`
const pageTitle = `${fullName} (${author}) • ${photoCountStr} on OpenBeta`
const pageTitle = `${fullName ?? ''} (${author}) • ${photoCountStr} on OpenBeta`
const pageImages = count > 0 ? getRandomPreviewImages(imageList) : []
return { author, pageTitle, pageImages }
}
Expand Down

0 comments on commit 11b4038

Please sign in to comment.