Skip to content

Commit

Permalink
[fix] don't emit registrationFail and registrationSuccess in case of …
Browse files Browse the repository at this point in the history
…error
  • Loading branch information
mmalecki committed Aug 31, 2011
1 parent 7cbb99e commit ec1af85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/login.js
Expand Up @@ -30,7 +30,7 @@ Login.prototype._listeners = function () {
self.on('*::userRegister', function (data) {
self.userRegister(data.email, data.password, function (err, res) {
if (err) {
self.emit('registrationFail', err);
return self.emit('registrationFail', err);
}
self.emit('registrationSuccess', res);
});
Expand Down

0 comments on commit ec1af85

Please sign in to comment.