From 90e48cbc1602be11e1f058e1721e7fb82c5ceac7 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Thu, 14 Mar 2024 09:54:21 +0500 Subject: [PATCH] core: fix note not unlinked from vault on unlock --- packages/core/src/api/vault.ts | 3 +++ 1 file changed, 3 insertions(+) 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,