Merge pull request #1116 from sharelatex/as-fix-history-error

Fix error thrown when viewing history with non-default font size

GitOrigin-RevId: f4f561bfe25537663cddf79d1867393bd209dd38
This commit is contained in:
Simon Detheridge 2018-11-07 10:21:15 +00:00 committed by sharelatex
parent baa5574669
commit b39cdbc874

View file

@ -762,11 +762,13 @@ define([
return doc.off('change', onChange)
}
editor.renderer.on('changeCharacterSize', () =>
scope.$apply(
() => (scope.rendererData.lineHeight = editor.renderer.lineHeight)
)
)
if (scope.rendererData != null) {
editor.renderer.on('changeCharacterSize', () => {
scope.$apply(
() => (scope.rendererData.lineHeight = editor.renderer.lineHeight)
)
})
}
scope.$watch('rendererData', function(rendererData) {
if (rendererData != null) {