Fixed problem with levels that don't have next levels in campaign editor.

This commit is contained in:
Nick Winter 2015-01-15 09:07:47 -08:00
parent b0d00ce213
commit 38297a1fd7

View file

@ -192,7 +192,7 @@ module.exports = class CampaignView extends RootView
@highlightElement '.level.next', delay: 500, duration: 60000, rotation: 0, sides: ['top']
if @editorMode
for level in @campaign.renderedLevels
for nextLevelOriginal in level.nextLevels
for nextLevelOriginal in level.nextLevels ? []
if nextLevel = _.find(@campaign.renderedLevels, original: nextLevelOriginal)
@createLine level.position, nextLevel.position
@applyCampaignStyles()