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

fix https://toeverything.sentry.io/issues/5059796018/events/0899e77a3f6842088568b4cc42b814d7/
This commit is contained in:
EYHN
2024-03-13 02:43:28 +00:00
parent d8f9e357d0
commit 05b79aae89

View File

@@ -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);
});
},