Explorar o código

Modified null check

Norio Suzuki %!s(int64=8) %!d(string=hai) anos
pai
achega
0ad3673069
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/routes/me.js

+ 1 - 1
lib/routes/me.js

@@ -90,7 +90,7 @@ module.exports = function(crowi, app) {
       }
 
       User.findOne({email: email}, (err, existingUserData) => {
-        if (existingUserData !== null) {
+        if (existingUserData) {
           debug('Email address was duplicated');
           req.form.errors.push('It can not be changed to that mail address');
           return res.render('me/index', {});