mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Don't try to open deleted docs for editing
This commit is contained in:
parent
3ddfa607e1
commit
54ecab854d
1 changed files with 7 additions and 1 deletions
|
@ -94,7 +94,13 @@ define [
|
|||
@ide.editor.enable()
|
||||
@ide.fileViewManager.enable()
|
||||
@disable()
|
||||
@ide.fileTreeManager.openDoc(@doc_id)
|
||||
|
||||
doc = @ide.fileTreeManager.getEntity(@doc_id, include_deleted: true)
|
||||
if doc? and doc.get("deleted")
|
||||
@ide.fileTreeManager.openDoc(@ide.project.get("rootDoc_id"))
|
||||
else
|
||||
@ide.fileTreeManager.openDoc(@doc_id)
|
||||
|
||||
@ide.tabManager.show "code"
|
||||
@resetLabels()
|
||||
@ide.fileTreeManager.makeReadWriteIfAllowed()
|
||||
|
|
Loading…
Reference in a new issue