Fixed a bug with new levels in the level editor.

This commit is contained in:
Scott Erickson 2014-09-02 17:38:52 -07:00
parent 5b0e996f93
commit 4a100a501a

View file

@ -30,7 +30,7 @@ module.exports = class Level extends CocoModel
denormalize: (supermodel, session) ->
o = $.extend true, {}, @attributes
if @get('type', true) is 'hero'
if o.thangs and @get('type', true) is 'hero'
# TOOD: figure out if/when/how we are doing this for non-Hero levels that aren't expecting denormalization.
for levelThang in o.thangs
@denormalizeThang(levelThang, supermodel, session)