Skip to content

Commit

Permalink
fix: doc description type
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Nov 16, 2020
1 parent 95cf813 commit 40c02e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ui/app/src/SEO/SEO.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ export const SEO: FC<SEOProps> = ({ Helmet, doc, config }) => {
isLocalImage && pageImage
? ensureTrailingSlash(siteUrl) + removeStartingSlash(pageImage)
: pageImage;
const pageDescription = story?.description || docDescription || description;
const pageDescription = ((typeof story?.description === 'string'
? story.description
: undefined) ||
docDescription ||
description) as string | undefined;
const url =
typeof window === 'undefined'
? getStoryPath(story?.id, doc, store, tab)
Expand Down

0 comments on commit 40c02e1

Please sign in to comment.