Skip to content

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

web: fix crash on opening an empty notebook

Abdullah Atta53925828192e
diff --git a/apps/web/src/views/topics.js b/apps/web/src/views/topics.js
index e782e6beb..d4b3981d0 100644
--- a/apps/web/src/views/topics.js
+++ b/apps/web/src/views/topics.js
@@ -87,7 +87,8 @@ function Notebook() {
}, []);
const notes = useMemo(
- () => groupArray(context?.notes, db.settings.getGroupOptions("notes")),
+ () =>
+ groupArray(context?.notes || [], db.settings.getGroupOptions("notes")),
[context?.notes]
);