mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Minor defensive bug handling for the LevelSessionCodeView for when teamSpells has invalid, old data.
This commit is contained in:
parent
cd0d81438d
commit
00c11fd70e
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ module.exports = class LevelSessionCodeView extends CocoView
|
|||
teamSpells = @session.get('teamSpells')[team] or []
|
||||
filteredSpells = []
|
||||
for spell in teamSpells
|
||||
code = @session.getSourceFor(spell)
|
||||
code = @session.getSourceFor(spell) ? ''
|
||||
lines = code.split('\n').length
|
||||
height = lines * 16 + 20
|
||||
filteredSpells.push {
|
||||
|
|
Loading…
Reference in a new issue