mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-16 01:21:48 +01:00
fcall to just Q()
This commit is contained in:
parent
2b5915b257
commit
925102a86b
@ -402,9 +402,7 @@ function initCryptoService(constantsService) {
|
|||||||
|
|
||||||
CryptoService.prototype.encrypt = function (plainValue, key, plainValueEncoding) {
|
CryptoService.prototype.encrypt = function (plainValue, key, plainValueEncoding) {
|
||||||
if (plainValue === null || plainValue === undefined) {
|
if (plainValue === null || plainValue === undefined) {
|
||||||
return Q.fcall(function () {
|
return Q(null);
|
||||||
return null;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
plainValueEncoding = plainValueEncoding || 'utf8';
|
plainValueEncoding = plainValueEncoding || 'utf8';
|
||||||
|
@ -398,7 +398,7 @@ function initLoginService() {
|
|||||||
|
|
||||||
LoginService.prototype.saveNeverDomain = function (domain) {
|
LoginService.prototype.saveNeverDomain = function (domain) {
|
||||||
if (!domain) {
|
if (!domain) {
|
||||||
return Q.fcall(function () { });
|
return Q();
|
||||||
}
|
}
|
||||||
|
|
||||||
var key = 'neverDomains';
|
var key = 'neverDomains';
|
||||||
|
@ -90,9 +90,7 @@ function initTotpService() {
|
|||||||
var keyBytes = b32tobytes(keyb32);
|
var keyBytes = b32tobytes(keyb32);
|
||||||
|
|
||||||
if (!keyBytes.length || !timeBytes.length) {
|
if (!keyBytes.length || !timeBytes.length) {
|
||||||
return Q.fcall(function () {
|
return Q(null);
|
||||||
return null;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return sign(keyBytes, timeBytes).then(function (hashHex) {
|
return sign(keyBytes, timeBytes).then(function (hashHex) {
|
||||||
|
@ -75,9 +75,7 @@ function initUserService() {
|
|||||||
|
|
||||||
UserService.prototype.getUserIdPromise = function () {
|
UserService.prototype.getUserIdPromise = function () {
|
||||||
if (_userId) {
|
if (_userId) {
|
||||||
return Q.fcall(function () {
|
return Q(_userId);
|
||||||
return _userId;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return utilsService.getObjFromStorage(userIdKey).then(function (obj) {
|
return utilsService.getObjFromStorage(userIdKey).then(function (obj) {
|
||||||
|
Loading…
Reference in New Issue
Block a user