Explorar o código

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

Remove references to `this` in history toolbar

GitOrigin-RevId: 7e3e970317d94ab694ccd2ccd5bb89fee9cb72b6
Simon Detheridge %!s(int64=5) %!d(string=hai) anos
pai
achega
036018d65c

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

@@ -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)
           }
         })