Fixed a bug in the competitor code session setting when the player has no code yet.
This commit is contained in:
parent
da866a418c
commit
693fa06afb
1 changed files with 1 additions and 1 deletions
|
@ -128,7 +128,7 @@ module.exports = class PlayLevelView extends View
|
||||||
if s = @levelLoader.opponentSession
|
if s = @levelLoader.opponentSession
|
||||||
spells = s.get('teamSpells')?[s.get('team')]
|
spells = s.get('teamSpells')?[s.get('team')]
|
||||||
opponentCode = s.get('code')
|
opponentCode = s.get('code')
|
||||||
myCode = @session.get('code')
|
myCode = @session.get('code') or {}
|
||||||
for spell in spells
|
for spell in spells
|
||||||
continue unless c = opponentCode[spell]
|
continue unless c = opponentCode[spell]
|
||||||
myCode[spell] = c
|
myCode[spell] = c
|
||||||
|
|
Reference in a new issue