!undefined = true

!!undefined = false
!!!undefined = true

!false = true
!!false = false
!!!false = true

!true = false
!!true = true
!!!true = false

when using isEmailAvailable (positive) in correlation with exists (positive) make sure that the outcome is a positive return (and not an inverted)
v1.18.x
Vincent Briglia 12 years ago
parent 85fbe38e71
commit 8eae8a4fb5

@ -276,7 +276,7 @@ var utils = require('./../public/src/utils.js'),
User.isEmailAvailable = function(email, callback) {
RDB.exists('email:' + email + ':uid' , function(err, exists) {
callback(err, !!exists);
callback(err, !!!exists);
});
}

Loading…
Cancel
Save