Q shorthand
This commit is contained in:
parent
999689cf7e
commit
09c340bbe5
|
@ -173,14 +173,13 @@ function initCryptoService(constantsService) {
|
||||||
};
|
};
|
||||||
|
|
||||||
CryptoService.prototype.getOrgKeys = function () {
|
CryptoService.prototype.getOrgKeys = function () {
|
||||||
var deferred = Q.defer();
|
|
||||||
|
|
||||||
if (_orgKeys && _orgKeys.length) {
|
if (_orgKeys && _orgKeys.length) {
|
||||||
deferred.resolve(_orgKeys);
|
return Q(_orgKeys);
|
||||||
return deferred.promise;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var self = this;
|
var self = this,
|
||||||
|
deferred = Q.defer();
|
||||||
|
|
||||||
chrome.storage.local.get(encOrgKeysKey, function (obj) {
|
chrome.storage.local.get(encOrgKeysKey, function (obj) {
|
||||||
if (obj && obj.encOrgKeys) {
|
if (obj && obj.encOrgKeys) {
|
||||||
var orgKeys = {},
|
var orgKeys = {},
|
||||||
|
|
Loading…
Reference in New Issue