Merge pull request #3809 from overleaf/sk-history-exception-fix

Remove references to `this` in history toolbar

GitOrigin-RevId: 7e3e970317d94ab694ccd2ccd5bb89fee9cb72b6
This commit is contained in:
Simon Detheridge 2021-03-30 16:40:51 +01:00 committed by Copybot
parent ae0805e684
commit 036018d65c

View file

@ -109,13 +109,13 @@ export default App.controller(
.then(function(entity) {
if (type === 'doc') {
ide.editorManager.openDoc(entity)
this.ide.$timeout(() => {
this.$scope.$broadcast('history:toggle')
ide.$timeout(() => {
$scope.$broadcast('history:toggle')
}, 0)
} else if (type === 'file') {
ide.binaryFilesManager.openFile(entity)
this.ide.$timeout(() => {
this.$scope.$broadcast('history:toggle')
ide.$timeout(() => {
$scope.$broadcast('history:toggle')
}, 0)
}
})