Skip to content

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

web: fix context menu crash due to incorrect topic references (#2016)

Muhammad Ali22c146e35012
diff --git a/apps/web/src/components/note/index.js b/apps/web/src/components/note/index.js
index 036d203c6..56e7be4f0 100644
--- a/apps/web/src/components/note/index.js
+++ b/apps/web/src/components/note/index.js
@@ -563,6 +563,7 @@ function notebooksMenuItems({ note }) {
if (!notebook) return;
const notebookMenuItems = [];
for (const topicId of ref.topics) {
+ if (!notebook.topics.topic(topicId)) continue;
const topic = notebook.topics.topic(topicId)._topic;
notebookMenuItems.push({
key: topicId,