reached a stopping point, trying to fix a production bug
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
exports.index = function(req, res) {
|
||||
if (req.user) {
|
||||
if (req.user.challengesCompleted.length > 0) {
|
||||
nextChallenge = Math.max.apply(Math, req.user.challengesCompleted) + 1;
|
||||
Object.values(req.user.challengesHash);
|
||||
nextChallenge = Math.max.apply(Math, req.user.challengesHash) + 1;
|
||||
res.redirect("challenges/" + nextChallenge);
|
||||
} else {
|
||||
res.redirect("challenges/0");
|
||||
|
Reference in New Issue
Block a user