mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-29 00:20:04 +01:00
web: fix create vault dialog cannot be closed
This commit is contained in:
@@ -139,9 +139,13 @@ class Vault {
|
||||
.catch(({ message }) => {
|
||||
switch (message) {
|
||||
case VAULT_ERRORS.noVault:
|
||||
return Vault.createVault().then(() => Vault.lockNote(id));
|
||||
return Vault.createVault().then((result) =>
|
||||
result ? Vault.lockNote(id) : false
|
||||
);
|
||||
case VAULT_ERRORS.vaultLocked:
|
||||
return Vault.unlockVault().then(() => Vault.lockNote(id));
|
||||
return Vault.unlockVault().then((result) =>
|
||||
result ? Vault.lockNote(id) : false
|
||||
);
|
||||
default:
|
||||
showToast("error", message);
|
||||
console.error(message);
|
||||
|
||||
Reference in New Issue
Block a user