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,