A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
core: remove note's vault relation regardless of vault
Abdullah Atta77ee56dd148a
diff --git a/packages/core/src/api/vault.ts b/packages/core/src/api/vault.tsindex 55d433f3e..ea1c7e199 100644--- a/packages/core/src/api/vault.ts+++ b/packages/core/src/api/vault.ts@@ -180,9 +180,8 @@ export default class Vault {async remove(noteId: string, password: string) {await this.unlockNote(noteId, password, true);- const vault = await this.db.vaults.default();- if (!vault) await this.create(password);- else await this.db.relations.unlink(vault, { id: noteId, type: "note" });+ if (!(await this.exists())) await this.create(password);+ await this.db.relations.to({ id: noteId, type: "note" }, "vault").unlink();}/**