Просмотр исходного кода

Merge pull request #3482 from overleaf/jpa-cleanup-on-epoch-mismatch

[frontend] on editorOpenDocEpoch mismatch, cleanup the old doc

GitOrigin-RevId: b07beb33a17d218d7aa35961dee5e215bd82c315
Brian Gough 5 лет назад
Родитель
Сommit
0b94c89990
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      services/web/frontend/js/ide/editor/EditorManager.js

+ 1 - 0
services/web/frontend/js/ide/editor/EditorManager.js

@@ -273,6 +273,7 @@ export default (EditorManager = (function() {
               this.editorOpenDocEpoch
             } vs ${editorOpenDocEpoch}`
           )
+          new_sharejs_doc.leaveAndCleanUp()
           return callback(new Error('another document was loaded'))
         }
         this._bindToDocumentEvents(doc, new_sharejs_doc)