mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-02 23:16:51 +00:00
修复菜单自定义名的bug
This commit is contained in:
@@ -275,16 +275,15 @@ function getCustomMenu({ collectionData, NOTION_CONFIG }) {
|
||||
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)
|
||||
(post?.type === 'Menu' || post?.type === 'SubMenu')
|
||||
)
|
||||
const menus = []
|
||||
if (menuPages && menuPages.length > 0) {
|
||||
menuPages.forEach(e => {
|
||||
e.show = true
|
||||
if (e.type === BLOG.NOTION_PROPERTY_NAME.type_menu) {
|
||||
if (e.type === 'Menu') {
|
||||
menus.push(e)
|
||||
} else if (e.type === BLOG.NOTION_PROPERTY_NAME.type_sub_menu) {
|
||||
} else if (e.type === 'SubMenu') {
|
||||
const parentMenu = menus[menus.length - 1]
|
||||
if (parentMenu) {
|
||||
if (parentMenu.subMenus) {
|
||||
|
||||
Reference in New Issue
Block a user