Skip to content

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

core: fix note not unlinked from vault on unlock

Abdullah Atta90e48cbc1602
diff --git a/packages/core/src/api/vault.ts b/packages/core/src/api/vault.ts
index fa72c26da..05111c342 100644
--- a/packages/core/src/api/vault.ts
+++ b/packages/core/src/api/vault.ts
@@ -355,6 +355,9 @@ export default class Vault {
}
if (perm) {
+ await this.db.relations
+ .to({ id: noteId, type: "note" }, "vault")
+ .unlink();
await this.db.notes.add({
id: noteId,
contentId: content.id,