mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-25 16:09:42 +01:00
fix: Cannot read property 'topics' of undefined
This commit is contained in:
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user