Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(core): fix tags includes missing error (#6096)

EYHN05b79aae89da
diff --git a/packages/frontend/core/src/components/page-list/use-tag-metas.ts b/packages/frontend/core/src/components/page-list/use-tag-metas.ts
index 4e28c36165..2e6f9d5e05 100644
--- a/packages/frontend/core/src/components/page-list/use-tag-metas.ts
+++ b/packages/frontend/core/src/components/page-list/use-tag-metas.ts
@@ -43,6 +43,9 @@ export function useTagMetas(pageMetas: DocMeta[]) {
const filterPageMetaByTag = useCallback(
(tagId: string) => {
return pageMetas.filter(page => {
+ if (!page.tags) {
+ return false;
+ }
return page.tags.includes(tagId);
});
},