mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-27 06:23:41 -04:00
Fixed #958. LevelLoader wasn't handling cached session objects passed in with the supermodel.
This commit is contained in:
parent
ff51f18a90
commit
c037ce14f2
1 changed files with 4 additions and 4 deletions
|
@ -59,13 +59,13 @@ module.exports = class LevelLoader extends CocoClass
|
|||
url = "/db/level/#{@levelID}/session"
|
||||
url += "?team=#{@team}" if @team
|
||||
|
||||
@session = new LevelSession().setURL url
|
||||
@supermodel.loadModel(@session, 'level_session', {cache:false})
|
||||
session = new LevelSession().setURL url
|
||||
@session = @supermodel.loadModel(session, 'level_session', {cache:false}).model
|
||||
@session.once 'sync', -> @url = -> '/db/level.session/' + @id
|
||||
|
||||
if @opponentSessionID
|
||||
@opponentSession = new LevelSession().setURL "/db/level_session/#{@opponentSessionID}"
|
||||
@supermodel.loadModel(@opponentSession, 'opponent_session')
|
||||
opponentSession = new LevelSession().setURL "/db/level_session/#{@opponentSessionID}"
|
||||
@opponentSession = @supermodel.loadModel(opponentSession, 'opponent_session').model
|
||||
|
||||
# Supermodel (Level) Loading
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue