Fixing undefined challengeName on info pages

This commit is contained in:
Nathan Leniz
2015-02-08 14:24:42 -05:00
parent f572e4cb77
commit 9808db4f30
5 changed files with 11 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ var highestChallengeNumber = 53;
exports.returnChallenge = function(req, res, next) {
var challengeNumber = parseInt(req.params.challengeNumber) || 0;
debug(challengeNumber);
if (challengeNumber > highestChallengeNumber) {
req.flash('errors', {
msg: "It looks like you've either completed all the challenges we have available or requested a challenge we don't have."