From 00c11fd70e1915f070de72d52978258d997fc427 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Fri, 18 Jul 2014 16:45:35 -0700 Subject: [PATCH] Minor defensive bug handling for the LevelSessionCodeView for when teamSpells has invalid, old data. --- app/views/common/LevelSessionCodeView.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/common/LevelSessionCodeView.coffee b/app/views/common/LevelSessionCodeView.coffee index 768793115..277eb2e3e 100644 --- a/app/views/common/LevelSessionCodeView.coffee +++ b/app/views/common/LevelSessionCodeView.coffee @@ -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 {