mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-24 07:29:30 +01:00
core: auto create vault if non exists & user opens a locked note
This commit is contained in:
@@ -180,7 +180,7 @@ export default class Vault {
|
|||||||
if (!note) return;
|
if (!note) return;
|
||||||
await this._unlockNote(note.data, password, true);
|
await this._unlockNote(note.data, password, true);
|
||||||
|
|
||||||
if (!this.exists()) await this.create(password);
|
if (!(await this.exists())) await this.create(this.password);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -194,7 +194,7 @@ export default class Vault {
|
|||||||
|
|
||||||
const unlockedNote = await this._unlockNote(note.data, password, false);
|
const unlockedNote = await this._unlockNote(note.data, password, false);
|
||||||
this._password = password;
|
this._password = password;
|
||||||
if (!this.exists()) await this.create(this._password);
|
if (!(await this.exists())) await this.create(password);
|
||||||
return unlockedNote;
|
return unlockedNote;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user