瀏覽代碼

fix: ensure bookmarks are filtered correctly by checking for null page values

Shun Miyazawa 4 月之前
父節點
當前提交
d021219a11
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      apps/app/src/server/routes/apiv3/bookmarks.ts

+ 1 - 0
apps/app/src/server/routes/apiv3/bookmarks.ts

@@ -264,6 +264,7 @@ module.exports = (crowi) => {
         const filteredBookmarks = isHidingUserPages
           ? userRootBookmarks.filter(
               (bookmark) =>
+                bookmark.page != null &&
                 !isUserPage(bookmark.page.path) &&
                 !isUsersTopPage(bookmark.page.path),
             )