mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-05-03 01:14:46 -04:00
Fixed another off-by-one error
This commit is contained in:
parent
6fd89f10b9
commit
806b159aab
2 changed files with 5 additions and 2 deletions
app
|
@ -222,7 +222,10 @@ self.retrieveValueFromFrame = function retrieveValueFromFrame(args) {
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
value = _.last(_.last(self.world.userCodeMap[currentThangID][currentSpellID].flow.states).statements).variables[prop];
|
var flowStates = self.world.userCodeMap[currentThangID][currentSpellID].flow.states;
|
||||||
|
//we have to go to the second last flowState as we run the world for one additional frame
|
||||||
|
//to collect the flow
|
||||||
|
value = _.last(flowStates[flowStates.length - 2].statements).variables[prop];
|
||||||
}
|
}
|
||||||
catch (e)
|
catch (e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,7 +35,7 @@ module.exports = class DebugView extends View
|
||||||
|
|
||||||
handleDebugValue: (returnObject) ->
|
handleDebugValue: (returnObject) ->
|
||||||
{key, value} = returnObject
|
{key, value} = returnObject
|
||||||
unless key is @variableChain.join(".") then return
|
if @variableChain and not key is @variableChain.join(".") then return
|
||||||
@$el.find("code").text "#{key}: #{value}"
|
@$el.find("code").text "#{key}: #{value}"
|
||||||
@$el.show().css(@pos)
|
@$el.show().css(@pos)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue