Q shorthand

This commit is contained in:
Kyle Spearrin 2017-10-17 12:23:32 -04:00
parent 999689cf7e
commit 09c340bbe5
1 changed files with 4 additions and 5 deletions

View File

@ -173,14 +173,13 @@ function initCryptoService(constantsService) {
};
CryptoService.prototype.getOrgKeys = function () {
var deferred = Q.defer();
if (_orgKeys && _orgKeys.length) {
deferred.resolve(_orgKeys);
return deferred.promise;
return Q(_orgKeys);
}
var self = this;
var self = this,
deferred = Q.defer();
chrome.storage.local.get(encOrgKeysKey, function (obj) {
if (obj && obj.encOrgKeys) {
var orgKeys = {},