From e09f19bb9efc898fb6e9b40cbd150747fcbb4359 Mon Sep 17 00:00:00 2001 From: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> Date: Fri, 15 Sep 2023 11:37:40 +0300 Subject: [PATCH] Check for empty image --- apps/codeforafrica/src/lib/data/seo.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/codeforafrica/src/lib/data/seo.js b/apps/codeforafrica/src/lib/data/seo.js index f93e462c8..081ee67be 100644 --- a/apps/codeforafrica/src/lib/data/seo.js +++ b/apps/codeforafrica/src/lib/data/seo.js @@ -19,7 +19,11 @@ function stringifyDescription(description) { export default function getPageSeoFromMeta(page, settings) { const { title: pageTitle, meta: pageMeta } = page; - const { title: metaTitle, description: metaDescription, image } = pageMeta; + const { + title: metaTitle, + description: metaDescription, + image = {}, + } = pageMeta; const { title: siteTitle, description: siteDescription } = settings; const title = metaTitle || pageTitle || siteTitle || null; const description =