mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-24 16:49:26 +01:00
only get keys if private key returns null
This commit is contained in:
parent
81101f2890
commit
038e95dbdf
@ -133,7 +133,7 @@ function initCryptoService(constantsService) {
|
||||
var self = this;
|
||||
chrome.storage.local.get('encPrivateKey', function (obj) {
|
||||
if (!obj || !obj.encPrivateKey) {
|
||||
deferred.reject('Cannot get enc private key.');
|
||||
deferred.resolve(null);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ function initSyncService() {
|
||||
self.cryptoService.getPrivateKey().then(function (privateKey) {
|
||||
setKeys(!!privateKey, response, deferred);
|
||||
}, function () {
|
||||
setKeys(false, response, deferred);
|
||||
setKeys(true, response, deferred);
|
||||
});
|
||||
}, function () {
|
||||
deferred.reject();
|
||||
|
Loading…
Reference in New Issue
Block a user