forEach函数异常

This commit is contained in:
tangly1024
2022-03-14 12:42:58 +08:00
parent d58f52203a
commit 0a1b786673

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 || []
}
/**