forEach函数异常

This commit is contained in:
tangly1024
2022-03-14 12:42:58 +08:00
parent ad79b2f841
commit 3030423cf2

View File

@@ -115,13 +115,13 @@ async function getCustomNav ({ notionPageData }) {
function getTagOptions (schema) {
if (!schema) return {}
const tagSchema = Object.values(schema).find(e => e.name === 'tags')
return tagSchema?.options || {}
return tagSchema?.options || []
}
function getCategoryOptions (schema) {
if (!schema) return {}
const categorySchema = Object.values(schema).find(e => e.name === 'category')
return categorySchema?.options || {}
return categorySchema?.options || []
}
/**