From e8a549dc647ace7e511efc3fe706017425857f3e Mon Sep 17 00:00:00 2001 From: tangly Date: Thu, 27 Oct 2022 12:51:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E7=BD=B2=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/notion/getPageProperties.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/notion/getPageProperties.js b/lib/notion/getPageProperties.js index 4ba4a399..6243fb28 100644 --- a/lib/notion/getPageProperties.js +++ b/lib/notion/getPageProperties.js @@ -67,11 +67,11 @@ async function getPageProperties(id, block, schema, authToken, tagOptions, siteI }) } - properties.type = properties.type[0] - properties.status = properties.status[0] + properties.type = properties.type?.[0] + properties.status = properties.status?.[0] if (properties.type === 'Post') { - properties.slug = `${BLOG.POST_URL_PREFIX ? BLOG.POST_URL_PREFIX + '/' : ''}` + (properties.slug ?? properties.id) + properties.slug = BLOG.POST_URL_PREFIX + '/' + (properties.slug ?? properties.id) } else { properties.slug = (properties.slug ?? properties.id) }