A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix: Cannot read property 'topics' of undefined
thecodrr7930fdb5ddfb
diff --git a/apps/web/src/common/index.js b/apps/web/src/common/index.jsindex 1a8524762..71f6a54ba 100644--- a/apps/web/src/common/index.js+++ b/apps/web/src/common/index.js@@ -63,8 +63,10 @@ export function notesFromContext(context) {notes = db.notes.colored(context.value);break;case "topic":- const notebook = db.notebooks.notebook(context.value.id);- const topic = notebook.topics.topic(context.value.topic);+ const notebook = db.notebooks.notebook(context?.value?.id);+ if (!notebook) break;+ const topic = notebook.topics?.topic(context?.value?.topic);+ if (!topic) break;notes = topic.all;break;case "favorite":