mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Fix bad if statement sending doc open into infinite loop
This commit is contained in:
parent
d6605610f5
commit
87cc08569a
1 changed files with 2 additions and 1 deletions
|
@ -29,10 +29,11 @@ define [
|
|||
do tryOpen = () ->
|
||||
if iterations > 5
|
||||
return
|
||||
iterations += 1
|
||||
entity = ide.fileTreeManager.findEntityById(id)
|
||||
if entity? and type == 'doc'
|
||||
ide.editorManager.openDoc(entity)
|
||||
if entity? and type == 'file'
|
||||
else if entity? and type == 'file'
|
||||
ide.binaryFilesManager.openFile(entity)
|
||||
else
|
||||
setTimeout(tryOpen, 500)
|
||||
|
|
Loading…
Reference in a new issue