1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-30 13:03:53 +01:00

handle null condition when decrypting

This commit is contained in:
Kyle Spearrin 2017-04-13 11:53:07 -04:00
parent 7042f4bca8
commit 0d29c75e7f

View File

@ -125,10 +125,10 @@ angular
property = cryptoService.decrypt(property, key); property = cryptoService.decrypt(property, key);
} }
catch (err) { catch (err) {
property = '[error: cannot decrypt]'; property = null;
} }
return property; return property || '[error: cannot decrypt]';
}; };
_service.encryptLogins = function (unencryptedLogins, key) { _service.encryptLogins = function (unencryptedLogins, key) {