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.
|
# 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
|
# 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()
|
@clearAetherDisplay()
|
||||||
|
if codeHasChangedSignificantly and not codeIsAsCast
|
||||||
workerMessage =
|
workerMessage =
|
||||||
function: "transpile"
|
function: "transpile"
|
||||||
spellKey: @spell.spellKey
|
spellKey: @spell.spellKey
|
||||||
|
@ -342,14 +348,11 @@ module.exports = class SpellView extends View
|
||||||
@worker.removeEventListener("message",arguments.callee, false)
|
@worker.removeEventListener("message",arguments.callee, false)
|
||||||
aether.problems = workerData.problems
|
aether.problems = workerData.problems
|
||||||
aether.raw = source
|
aether.raw = source
|
||||||
@displayAether aether
|
finishUpdatingAether(aether)
|
||||||
@lastUpdatedAetherSpellThang = @spellThang
|
|
||||||
@guessWhetherFinished aether if fromCodeChange
|
|
||||||
@worker.postMessage JSON.stringify(workerMessage)
|
@worker.postMessage JSON.stringify(workerMessage)
|
||||||
#aether.transpile source if codeHasChangedSignificantly and not codeIsAsCast
|
else
|
||||||
#@displayAether aether
|
finishUpdatingAether(aether)
|
||||||
#@lastUpdatedAetherSpellThang = @spellThang
|
|
||||||
#@guessWhetherFinished aether if fromCodeChange
|
|
||||||
|
|
||||||
clearAetherDisplay: ->
|
clearAetherDisplay: ->
|
||||||
problem.destroy() for problem in @problems
|
problem.destroy() for problem in @problems
|
||||||
|
|
Reference in a new issue