ESlint no-unneeded-ternary

and no-extend-native, no-sequences
This commit is contained in:
Peter Jaszkowiak
2017-02-18 12:59:46 -07:00
parent 64a6322002
commit c4bdb72941
15 changed files with 24 additions and 23 deletions

View File

@@ -214,7 +214,7 @@ authenticationController.login = function (req, res, next) {
if (err) {
return next(err);
}
req.body.username = username ? username : req.body.username;
req.body.username = username || req.body.username;
continueLogin(req, res, next);
});
} else if (loginWith.indexOf('username') !== -1 && !validator.isEmail(req.body.username)) {