web: fix crash on opening editor properties

(fixes #3585)
This commit is contained in:
Abdullah Atta
2023-10-31 12:03:45 +05:00
parent ebc95fcea7
commit c6def2a8fe

View File

@@ -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]
);