1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

only get keys if private key returns null

This commit is contained in:
Kyle Spearrin 2017-05-22 09:28:11 -04:00
parent 81101f2890
commit 038e95dbdf
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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();