From 9ad4602e0f5d7f766baf8c938c00eec39f0b6c4e Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Mon, 19 May 2014 20:10:51 -0700 Subject: [PATCH] Fixed a bug with the new goal view. --- app/lib/world/GoalManager.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/lib/world/GoalManager.coffee b/app/lib/world/GoalManager.coffee index 2a23c64eb..7e0e73250 100644 --- a/app/lib/world/GoalManager.coffee +++ b/app/lib/world/GoalManager.coffee @@ -78,8 +78,8 @@ module.exports = class GoalManager extends CocoClass # main instance gets them and updates their existing goal states, # passes the word along onNewWorldCreated: (e) -> - @updateGoalStates(e.goalStates) if e.goalStates? @world = e.world + @updateGoalStates(e.goalStates) if e.goalStates? updateGoalStates: (newGoalStates) -> for goalID, goalState of newGoalStates @@ -109,6 +109,7 @@ module.exports = class GoalManager extends CocoClass goals: @goals overallStatus: overallStatus timedOut: @world.totalFrames is @world.maxTotalFrames + console.log 'timed out', @world.totalFrames is @world.maxTotalFrames, @world.totalFrames, @world.maxTotalFrames, @world.frames.length Backbone.Mediator.publish('goal-manager:new-goal-states', event) checkOverallStatus: (ignoreIncomplete=false) ->