Преглед изворни кода

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

Remove references to `this` in history toolbar

GitOrigin-RevId: 7e3e970317d94ab694ccd2ccd5bb89fee9cb72b6
Simon Detheridge пре 5 година
родитељ
комит
036018d65c

+ 4 - 4
services/web/frontend/js/ide/history/controllers/HistoryV2ToolbarController.js

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