Skip to content

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

core: handle note open/unlock using try/catch

kashaf-ansari-dev251e635ccbda
diff --git a/packages/core/src/api/vault.ts b/packages/core/src/api/vault.ts
index e9d6d22c2..1e299e4b7 100644
--- a/packages/core/src/api/vault.ts
+++ b/packages/core/src/api/vault.ts
@@ -202,7 +202,9 @@ export default class Vault {
);
if (password) {
- await this.unlock(password).catch(() => {});
+ try {
+ await this.unlock(password);
+ } catch {}
}
return { ...note, content };