mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-04 01:29:21 +00:00
auth.auth: ensure v
This commit is contained in:
parent
4fa4519b34
commit
fb1cc7b127
1 changed files with 1 additions and 1 deletions
|
|
@ -29,7 +29,7 @@ api.auth = function(req, res, next) {
|
|||
if (_.isEmpty(user)) return res.json(401, NO_USER_FOUND);
|
||||
|
||||
// Remove this after a few days. Users aren't refreshing after the pets roll out, which is required
|
||||
if (_.find(req.body, function(v){return v.data && _.isArray(v.data['items.pets'])})) {
|
||||
if (_.find(req.body, function(v){return v && v.data && _.isArray(v.data['items.pets'])})) {
|
||||
// simply discard the update. Unfortunately, sending an error will keep their set ops in the sync queue.
|
||||
return res.json(200, {_v: user._v-1});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue