Skip to content

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

web: default notebook always assigned to note (fixes #5861)

Abdullah Attaa86d9a9c0ce8
diff --git a/apps/web/src/stores/editor-store.ts b/apps/web/src/stores/editor-store.ts
index c7303ef95..66cb5b6b5 100644
--- a/apps/web/src/stores/editor-store.ts
+++ b/apps/web/src/stores/editor-store.ts
@@ -802,10 +802,11 @@ class EditorStore extends BaseStore<EditorStore> {
{ type, id: currentSession.context.id },
{ id, type: "note" }
);
+ } else {
+ const defaultNotebook = db.settings.getDefaultNotebook();
+ if (defaultNotebook)
+ await db.notes.addToNotebook(defaultNotebook, id);
}
- const defaultNotebook = db.settings.getDefaultNotebook();
- if (defaultNotebook)
- await db.notes.addToNotebook(defaultNotebook, id);
}
const attachmentsLength = await db.attachments