fix a strange bug caused by an apparent clash in variables introduced this morning by my menu refactor

pull/10/head
Michael Q Larson 2014-12-30 22:03:03 -08:00
parent 1dda38eaaa
commit a00070e5c5
4 changed files with 11 additions and 17 deletions

View File

@ -141,8 +141,8 @@ exports.getAccount = function(req, res) {
}
res.render('account/profile', {
title: 'Manage your Free Code Camp Account',
c: c,
cc: req.user.challengesHash,
challenges: c,
ch: req.user.challengesHash,
moment: moment
});
});

View File

@ -71,7 +71,7 @@ block content
i.fa.fa-twitter
| Link Twitter with your account
br
- if (cc[0] > 0)
- if (ch[0] > 0)
.panel
.container
h1 Completed Challenges
@ -81,11 +81,11 @@ block content
tr
th Challenge
th Date Finished
for challenge in c
if cc[challenge.challengeNumber] > 0
for challenge in challenges
if ch[challenge.challengeNumber] > 0
tr
td= c[challenge.challengeNumber].name
td= moment(cc[challenge.challengeNumber], 'X').format("MMM DD, YYYY")
td= challenges[challenge.challengeNumber].name
td= moment(ch[challenge.challengeNumber], 'X').format("MMM DD, YYYY")
br
.panel
.container

View File

@ -12,13 +12,13 @@ nav.navbar.navbar-default.navbar-fixed-top.nav-height
ul.nav.navbar-nav.navbar-right
li
a(href='/') Challenges
- if (!cc || (cc && cc[1]) < 1)
- if (!cc || (cc && cc[1] < 1))
li
a(href='/challenges/1') Chat
- else
li
a(href='http://chat.freecodecamp.com' target='_blank') Chat
- if (!cc || (cc && cc[2]) < 1)
- if (!cc || (cc && cc[2] < 1))
li
a(href='/challenges/2') Forum
- else

View File

@ -62,13 +62,7 @@ block content
= c39
.row
.col-xs-6.text-right
h2 49 Points:
h2 All 54 Points:
.col-xs-6.text-left
h2
= c49
.row
.col-xs-6.text-right
h2 All 60 Points:
.col-xs-6.text-left
h2
= c59
= all