From 925102a86bd9b6e32ed10114c372ded210435382 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 13 Oct 2017 21:39:31 -0400 Subject: [PATCH] fcall to just Q() --- src/services/cryptoService.js | 4 +--- src/services/loginService.js | 2 +- src/services/totpService.js | 4 +--- src/services/userService.js | 4 +--- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/services/cryptoService.js b/src/services/cryptoService.js index 8e472655..ac442fad 100644 --- a/src/services/cryptoService.js +++ b/src/services/cryptoService.js @@ -402,9 +402,7 @@ function initCryptoService(constantsService) { CryptoService.prototype.encrypt = function (plainValue, key, plainValueEncoding) { if (plainValue === null || plainValue === undefined) { - return Q.fcall(function () { - return null; - }); + return Q(null); } plainValueEncoding = plainValueEncoding || 'utf8'; diff --git a/src/services/loginService.js b/src/services/loginService.js index bd5e86c6..7aadeb29 100644 --- a/src/services/loginService.js +++ b/src/services/loginService.js @@ -398,7 +398,7 @@ function initLoginService() { LoginService.prototype.saveNeverDomain = function (domain) { if (!domain) { - return Q.fcall(function () { }); + return Q(); } var key = 'neverDomains'; diff --git a/src/services/totpService.js b/src/services/totpService.js index 389e62f4..b079a605 100644 --- a/src/services/totpService.js +++ b/src/services/totpService.js @@ -90,9 +90,7 @@ function initTotpService() { var keyBytes = b32tobytes(keyb32); if (!keyBytes.length || !timeBytes.length) { - return Q.fcall(function () { - return null; - }); + return Q(null); } return sign(keyBytes, timeBytes).then(function (hashHex) { diff --git a/src/services/userService.js b/src/services/userService.js index 5603cc26..6b9223b6 100644 --- a/src/services/userService.js +++ b/src/services/userService.js @@ -75,9 +75,7 @@ function initUserService() { UserService.prototype.getUserIdPromise = function () { if (_userId) { - return Q.fcall(function () { - return _userId; - }); + return Q(_userId); } return utilsService.getObjFromStorage(userIdKey).then(function (obj) {