mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
fix: a potential crash on fav list (#2716)
(cherry picked from commit 546d5764e6)
This commit is contained in:
@@ -34,7 +34,9 @@ function FavoriteMenuItem({
|
|||||||
const referencesToShow = useMemo(() => {
|
const referencesToShow = useMemo(() => {
|
||||||
return [
|
return [
|
||||||
...new Set(
|
...new Set(
|
||||||
references.filter(ref => !parentIds.has(ref) && !metaMapping[ref].trash)
|
references.filter(
|
||||||
|
ref => !parentIds.has(ref) && !metaMapping[ref]?.trash
|
||||||
|
)
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
}, [references, parentIds, metaMapping]);
|
}, [references, parentIds, metaMapping]);
|
||||||
|
|||||||
Reference in New Issue
Block a user