Merge pull request #416 from tangly1024/bug/deploy

修复部署错误
This commit is contained in:
tangly1024
2022-10-27 12:52:34 +08:00
committed by GitHub

View File

@@ -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)
}