Nav 主题菜单失效

This commit is contained in:
tangly1024
2024-02-03 19:29:03 +08:00
parent 44eaea8ca6
commit 1a4d4c15f9
2 changed files with 3 additions and 3 deletions

View File

@@ -142,7 +142,7 @@ function getCustomNav({ allPages }) {
* @returns
*/
function getCustomMenu({ collectionData }) {
const menuPages = collectionData.filter(post => (post?.type === BLOG.NOTION_PROPERTY_NAME.type_menu || post?.type === BLOG.NOTION_PROPERTY_NAME.type_sub_menu) && post.status === 'Published')
const menuPages = collectionData.filter(post => post.status === 'Published' && (post?.type === BLOG.NOTION_PROPERTY_NAME.type_menu || post?.type === BLOG.NOTION_PROPERTY_NAME.type_sub_menu))
const menus = []
if (menuPages && menuPages.length > 0) {
menuPages.forEach(e => {