bugfix/#741 - fix type of socialImage, fix condition

This commit is contained in:
alxshelepenok
2020-09-10 01:01:35 +03:00
parent f0c22e3583
commit 4a9648b189
3 changed files with 3 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ const Layout = ({
socialImage
}: Props) => {
const { author, url } = useSiteMetadata();
const metaImage = socialImage !== null ? socialImage : author.photo;
const metaImage = socialImage.length > 0 ? socialImage : author.photo;
const metaImageUrl = url + metaImage;
return (