fix: app crash on opening version history

(fixes streetwriters/notesnook#524)
This commit is contained in:
thecodrr
2022-04-19 17:22:06 +05:00
parent b27f20a149
commit 9c63251021

View File

@@ -15,7 +15,7 @@ function Header({ readonly }) {
const setTag = useStore((store) => store.setTag);
const setTitle = useStore((store) => store.setTitle);
const filterableTags = useMemo(() => {
return db.tags.all.filter((t) => tags.every((tag) => tag !== t.title));
return db.tags.all.filter((t) => tags?.every((tag) => tag !== t?.title));
}, [tags]);
return (