Przeglądaj źródła

fix: update bookmark population to handle null page values

Shun Miyazawa 2 miesięcy temu
rodzic
commit
e264fa6df3
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      apps/app/src/server/routes/apiv3/bookmarks.ts

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

@@ -247,7 +247,7 @@ module.exports = (crowi) => {
           _id: { $nin: bookmarkIdsInFolders },
           user: userId,
         })
-          .populate<{ page: PageDocument }>({
+          .populate<{ page: PageDocument | null }>({
             path: 'page',
             model: 'Page',
             populate: {