Merge branch 'ux-improvements' of https://github.com/FreeCodeCamp/freecodecamp into ux-improvements

This commit is contained in:
Michael Q Larson
2015-02-22 18:16:42 -08:00
4 changed files with 43 additions and 21 deletions

View File

@@ -44,12 +44,12 @@ exports.returnNextCourseware = function(req, res) {
if (err) {
next(err);
}
debug('This is the courseware object returned from mongo', courseware);
courseware = courseware.pop();
if (courseware === undefined) {
req.flash('errors', {
msg: "It looks like you've completed all the courses we have available. Good job!"
})
});
return res.redirect('../coursewares/start-our-challenges');
}
nameString = courseware.name.toLowerCase().replace(/\s/g, '-');