Minor defensive bug handling for the LevelSessionCodeView for when teamSpells has invalid, old data.

This commit is contained in:
Scott Erickson 2014-07-18 16:45:35 -07:00
parent cd0d81438d
commit 00c11fd70e

View file

@ -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 {