mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
trying some fixes for server crashing
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
// Generated by CoffeeScript 1.3.3
|
||||
var scoring;
|
||||
var scoring, _;
|
||||
|
||||
scoring = require('../app/scoring');
|
||||
|
||||
_ = require('lodash');
|
||||
|
||||
module.exports = function(expressApp, root, derby) {
|
||||
var deprecatedMessage, staticPages;
|
||||
staticPages = derby.createStatic(root);
|
||||
@@ -34,7 +36,7 @@ module.exports = function(expressApp, root, derby) {
|
||||
model.session.userId = uid;
|
||||
return model.fetch("users." + uid, function(err, user) {
|
||||
var delta, result;
|
||||
if (err || !user.get()) {
|
||||
if (err || _.isEmpty(user.get())) {
|
||||
err || (err = 'No user with that ID');
|
||||
return res.send(500, err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user