mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
Fix for runtime errors
This commit is contained in:
parent
86aa4cd0fe
commit
c408196814
1 changed files with 36 additions and 33 deletions
|
@ -330,7 +330,13 @@ module.exports = class SpellView extends View
|
|||
|
||||
# Now that that's figured out, perform the update.
|
||||
# The web worker Aether won't track state, so don't have to worry about updating it
|
||||
finishUpdatingAether = (aether) =>
|
||||
@displayAether aether
|
||||
@lastUpdatedAetherSpellThang = @spellThang
|
||||
@guessWhetherFinished aether if fromCodeChange
|
||||
|
||||
@clearAetherDisplay()
|
||||
if codeHasChangedSignificantly and not codeIsAsCast
|
||||
workerMessage =
|
||||
function: "transpile"
|
||||
spellKey: @spell.spellKey
|
||||
|
@ -342,14 +348,11 @@ module.exports = class SpellView extends View
|
|||
@worker.removeEventListener("message",arguments.callee, false)
|
||||
aether.problems = workerData.problems
|
||||
aether.raw = source
|
||||
@displayAether aether
|
||||
@lastUpdatedAetherSpellThang = @spellThang
|
||||
@guessWhetherFinished aether if fromCodeChange
|
||||
finishUpdatingAether(aether)
|
||||
@worker.postMessage JSON.stringify(workerMessage)
|
||||
#aether.transpile source if codeHasChangedSignificantly and not codeIsAsCast
|
||||
#@displayAether aether
|
||||
#@lastUpdatedAetherSpellThang = @spellThang
|
||||
#@guessWhetherFinished aether if fromCodeChange
|
||||
else
|
||||
finishUpdatingAether(aether)
|
||||
|
||||
|
||||
clearAetherDisplay: ->
|
||||
problem.destroy() for problem in @problems
|
||||
|
|
Loading…
Reference in a new issue