Merge pull request #189 from javorszky/iss184

Fix forge returning null on empty fetch
This commit is contained in:
Hannah Wolfe 2013-06-22 05:44:38 -07:00
commit ecde2f078a

View File

@ -74,9 +74,9 @@
*/
return this.forge().fetch().then(function (user) {
_.each(user.attributes, function (value, key, list) {
if (user) {
fail = true;
});
}
if (fail) {
return when.reject(new Error('A user is already registered. Only one user for now!'));
@ -167,4 +167,4 @@
Users: Users
};
}());
}());