mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 05:53:39 -04:00
Hotfix for the profile view.
This commit is contained in:
parent
cdea4befd9
commit
152b860a23
1 changed files with 5 additions and 2 deletions
|
@ -224,8 +224,11 @@ module.exports = class ProfileView extends View
|
|||
links = ($.extend(true, {}, link) for link in links)
|
||||
link.icon = @iconForLink link for link in links
|
||||
context.profileLinks = _.sortBy links, (link) -> not link.icon # icons first
|
||||
context.sessions = (s.attributes for s in @sessions.models when (s.get('submitted') or s.get('level-id') is 'gridmancer'))
|
||||
context.sessions.sort (a, b) -> (b.playtime ? 0) - (a.playtime ? 0)
|
||||
if @sessions
|
||||
context.sessions = (s.attributes for s in @sessions.models when (s.get('submitted') or s.get('level-id') is 'gridmancer'))
|
||||
context.sessions.sort (a, b) -> (b.playtime ? 0) - (a.playtime ? 0)
|
||||
else
|
||||
context.sessions = []
|
||||
context
|
||||
|
||||
afterRender: ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue