summaryrefslogtreecommitdiffstats
path: root/src/pages/contact.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages/contact.tsx')
-rw-r--r--src/pages/contact.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pages/contact.tsx b/src/pages/contact.tsx
index d88a8a1..fcfbe1d 100644
--- a/src/pages/contact.tsx
+++ b/src/pages/contact.tsx
@@ -41,7 +41,7 @@ const ContactPage: NextPage = () => {
const { asPath } = useRouter();
const pageUrl = `${website.url}${asPath}`;
const pagePublicationDate = new Date(dates.publication);
- const pageUpdateDate = new Date(dates.update);
+ const pageUpdateDate = dates.update ? new Date(dates.update) : undefined;
const webpageSchema: WebPage = {
'@id': `${pageUrl}`,
@@ -64,7 +64,7 @@ const ContactPage: NextPage = () => {
author: { '@id': `${website.url}/#branding` },
creator: { '@id': `${website.url}/#branding` },
dateCreated: pagePublicationDate.toISOString(),
- dateModified: pageUpdateDate.toISOString(),
+ dateModified: pageUpdateDate && pageUpdateDate.toISOString(),
datePublished: pagePublicationDate.toISOString(),
editor: { '@id': `${website.url}/#branding` },
inLanguage: website.locales.default,