1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-06 09:20:43 +01:00

resolve lint errors

This commit is contained in:
Kyle Spearrin 2017-03-21 23:07:38 -04:00
parent 715b91ab96
commit dde20f4451
4 changed files with 7 additions and 7 deletions

View File

@ -13,8 +13,8 @@
}); });
apiService.organizationUsers.get({ orgId: $state.params.orgId, id: id }, function (user) { apiService.organizationUsers.get({ orgId: $state.params.orgId, id: id }, function (user) {
if (user && user.Subvaults) {
var subvaults = {}; var subvaults = {};
if (user && user.Subvaults) {
for (var i = 0; i < user.Subvaults.Data.length; i++) { for (var i = 0; i < user.Subvaults.Data.length; i++) {
subvaults[user.Subvaults.Data[i].SubvaultId] = { subvaults[user.Subvaults.Data[i].SubvaultId] = {
subvaultId: user.Subvaults.Data[i].SubvaultId, subvaultId: user.Subvaults.Data[i].SubvaultId,

View File

@ -87,16 +87,16 @@ angular
profile.Organizations = []; profile.Organizations = [];
} }
var org = { var o = {
id: org.Id, id: org.Id,
name: org.Name, name: org.Name,
key: org.Key, key: org.Key,
status: org.Status status: org.Status
}; };
profile.organizations.push(org); profile.organizations.push(o);
_userProfile = profile; _userProfile = profile;
cryptoService.addOrgKey(org); cryptoService.addOrgKey(o);
} }
}; };

View File

@ -133,7 +133,7 @@ angular
} }
return property; return property;
} };
_service.encryptLogins = function (unencryptedLogins, key) { _service.encryptLogins = function (unencryptedLogins, key) {
if (!unencryptedLogins) throw "unencryptedLogins is undefined or null"; if (!unencryptedLogins) throw "unencryptedLogins is undefined or null";

View File

@ -18,7 +18,7 @@ angular
try { try {
var privateKeyBytes = _service.decrypt(privateKeyCt, key, 'raw'); var privateKeyBytes = _service.decrypt(privateKeyCt, key, 'raw');
$sessionStorage.privateKey = forge.util.encode64(privateKeyBytes); $sessionStorage.privateKey = forge.util.encode64(privateKeyBytes);
_privateKey = forge.pki.privateKeyFromAsn1(forge.asn1.fromDer(privateKeyBytes));; _privateKey = forge.pki.privateKeyFromAsn1(forge.asn1.fromDer(privateKeyBytes));
} }
catch (e) { catch (e) {
console.log('Cannot set private key. Decryption failed.'); console.log('Cannot set private key. Decryption failed.');
@ -171,7 +171,7 @@ angular
} }
return orgKeys[orgId]; return orgKeys[orgId];
} };
_service.clearKey = function () { _service.clearKey = function () {
_key = _b64Key = null; _key = _b64Key = null;