diff --git a/services/web/app/src/Features/Authentication/AuthenticationController.js b/services/web/app/src/Features/Authentication/AuthenticationController.js index 110babad3d..f3a0911f53 100644 --- a/services/web/app/src/Features/Authentication/AuthenticationController.js +++ b/services/web/app/src/Features/Authentication/AuthenticationController.js @@ -124,7 +124,7 @@ const AuthenticationController = (module.exports = { return next(error) } if (results.some(result => result && result.doNotFinish)) { - return next() + return } if (user.must_reconfirm) { diff --git a/services/web/test/unit/src/Authentication/AuthenticationControllerTests.js b/services/web/test/unit/src/Authentication/AuthenticationControllerTests.js index d709769eb2..4e9cf227fd 100644 --- a/services/web/test/unit/src/Authentication/AuthenticationControllerTests.js +++ b/services/web/test/unit/src/Authentication/AuthenticationControllerTests.js @@ -1238,12 +1238,11 @@ describe('AuthenticationController', function() { this.user, this.req, this.res, - error => { - expect(error).to.not.exist - expect(this.res.json.callCount).to.equal(0) - done() - } + this.next ) + expect(this.next.callCount).to.equal(0) + expect(this.res.json.callCount).to.equal(0) + done() }) it('call next with hook errors', function(done) {