Merge pull request #353 from sharelatex/as-clean-up-ace-worker

Tear down Ace session when aceEditor is destroyed
This commit is contained in:
Alasdair Smith 2018-02-23 10:14:19 +00:00 committed by GitHub
commit f4e704573d

View file

@ -430,6 +430,8 @@ define [
scope.$on '$destroy', () ->
if scope.sharejsDoc?
detachFromAce(scope.sharejsDoc)
session = editor.getSession()
session?.destroy()
scope.$emit "#{scope.name}:inited", editor