mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 21:41:52 +08:00
fix(core): fix tags includes missing error (#6096)
fix https://toeverything.sentry.io/issues/5059796018/events/0899e77a3f6842088568b4cc42b814d7/
This commit is contained in:
@@ -43,6 +43,9 @@ export function useTagMetas(pageMetas: DocMeta[]) {
|
|||||||
const filterPageMetaByTag = useCallback(
|
const filterPageMetaByTag = useCallback(
|
||||||
(tagId: string) => {
|
(tagId: string) => {
|
||||||
return pageMetas.filter(page => {
|
return pageMetas.filter(page => {
|
||||||
|
if (!page.tags) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return page.tags.includes(tagId);
|
return page.tags.includes(tagId);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user