Skip to content

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

fix: crash when opening context menu in topic note

thecodrr6a2e6231bec1
diff --git a/apps/web/src/components/note/index.js b/apps/web/src/components/note/index.js
index 8064f36b3..03367e8ab 100644
--- a/apps/web/src/components/note/index.js
+++ b/apps/web/src/components/note/index.js
@@ -225,19 +225,18 @@ const menuItems = [
const topicNoteMenuItems = [
...menuItems,
- [
- {
- key: "removefromtopic",
- title: "Remove from topic",
- onClick: async ({ note, context }) => {
- console.log("Remove from topic:", Object.isExtensible(note));
- await db.notebooks
- .notebook(context.value.id)
- .topics.topic(context.value.topic)
- .delete(note.id);
- store.setContext(context);
- await showToast("success", "Note removed from topic!");
- },
+ {
+ key: "removefromtopic",
+ title: () => "Remove from topic",
+ color: "red",
+ onClick: async ({ note, context }) => {
+ console.log("Remove from topic:", Object.isExtensible(note));
+ await db.notebooks
+ .notebook(context.value.id)
+ .topics.topic(context.value.topic)
+ .delete(note.id);
+ store.setContext(context);
+ await showToast("success", "Note removed from topic!");
},
- ],
+ },
];