Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: fix crash on opening editor properties

Abdullah Attac6def2a8fedb
diff --git a/apps/web/src/components/properties/index.jsx b/apps/web/src/components/properties/index.jsx
index 7ec933b05..a36161485 100644
--- a/apps/web/src/components/properties/index.jsx
+++ b/apps/web/src/components/properties/index.jsx
@@ -110,10 +110,11 @@ function Properties(props) {
"reminder"
);
const allNotebooks = useMemo(
- () => [
- ...notebooks.map((ref) => db.notebooks.notebook(ref.id)?.data),
- ...db.relations.to({ id: sessionId, type: "note" }, "notebook")
- ],
+ () =>
+ [
+ ...notebooks.map((ref) => db.notebooks.notebook(ref.id)?.data),
+ ...db.relations.to({ id: sessionId, type: "note" }, "notebook")
+ ].filter(Boolean),
[sessionId, notebooks]
);