mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Fixed error handling for results with no taskID
This commit is contained in:
parent
1486f31c37
commit
31bb9c8807
1 changed files with 5 additions and 2 deletions
|
@ -232,8 +232,11 @@ module.exports = class Simulator extends CocoClass
|
|||
|
||||
processResults: (simulationResults) ->
|
||||
taskResults = @formTaskResultsObject simulationResults
|
||||
console.error "*** Error: taskResults has no taskID ***\ntaskResults:", taskResults, "\ntask:", @task unless taskResults.taskID
|
||||
@sendResultsBackToServer taskResults
|
||||
unless taskResults.taskID
|
||||
console.error "*** Error: taskResults has no taskID ***\ntaskResults:", taskResults
|
||||
@cleanupAndSimulateAnotherTask()
|
||||
else
|
||||
@sendResultsBackToServer taskResults
|
||||
|
||||
sendResultsBackToServer: (results) ->
|
||||
@trigger 'statusUpdate', 'Simulation completed, sending results back to server!'
|
||||
|
|
Loading…
Reference in a new issue