Merge pull request #2685 from overleaf/jpa-fix-out-of-sync-open-doc

[frontend] EditorManager: out-of-sync: wait for joinProject to complete

GitOrigin-RevId: d3006f2ad36c6094815aa892e65d2cf8c8243472
This commit is contained in:
Jakob Ackermann 2020-03-30 12:19:14 +02:00 committed by Copybot
parent 199e310f25
commit 2ce244d662

View file

@ -242,7 +242,10 @@ define([
"Sorry, this file has gone out of sync and we need to do a full refresh. <br> <a href='/learn/Kb/Editor_out_of_sync_problems'>Please see this help guide for more information</a>"
)
}
return this.openDoc(doc, { forceReopen: true })
const removeHandler = this.$scope.$on('project:joined', () => {
this.openDoc(doc, { forceReopen: true })
removeHandler()
})
})
return sharejs_doc.on('externalUpdate', update => {