mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-30 12:24:25 +02:00
Don't error when detaching from history with no sharejsDoc
This commit is contained in:
@@ -428,7 +428,8 @@ define [
|
||||
rendererData.lineHeight = editor.renderer.lineHeight
|
||||
|
||||
scope.$on '$destroy', () ->
|
||||
detachFromAce(scope.sharejsDoc)
|
||||
if scope.sharejsDoc?
|
||||
detachFromAce(scope.sharejsDoc)
|
||||
|
||||
scope.$emit "#{scope.name}:inited", editor
|
||||
|
||||
|
||||
Reference in New Issue
Block a user