mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Fix play buttons not appearing sometimes on navigation
Repro steps: * Go to a ladder page * Click to play * Click link back to ladder * Before, the play buttons would not appear, now they do.
This commit is contained in:
parent
3387e5ee34
commit
f57ec17261
1 changed files with 3 additions and 1 deletions
|
@ -41,10 +41,12 @@ module.exports = class LadderView extends RootView
|
|||
|
||||
initialize: (options, @levelID, @leagueType, @leagueID) ->
|
||||
@level = @supermodel.loadModel(new Level(_id: @levelID)).model
|
||||
@level.once 'sync', =>
|
||||
onLoaded = =>
|
||||
return if @destroyed
|
||||
@levelDescription = marked(@level.get('description')) if @level.get('description')
|
||||
@teams = teamDataFromLevel @level
|
||||
|
||||
if @level.loaded then onLoaded() else @level.once('sync', onLoaded)
|
||||
@sessions = @supermodel.loadCollection(new LevelSessionsCollection(@levelID), 'your_sessions', {cache: false}).model
|
||||
@winners = require('./tournament_results')[@levelID]
|
||||
|
||||
|
|
Loading…
Reference in a new issue