Fix for runtime errors

This commit is contained in:
Michael Schmatz 2014-04-23 16:44:29 -07:00
parent 86aa4cd0fe
commit c408196814

View file

@ -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