mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Add in extra null check
This commit is contained in:
parent
32f1a327a6
commit
828aefe2c8
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ module.exports = DocManager =
|
||||||
|
|
||||||
_findDocInFolder: (folder = {}, doc_id, currentPath) ->
|
_findDocInFolder: (folder = {}, doc_id, currentPath) ->
|
||||||
for doc, i in folder.docs or []
|
for doc, i in folder.docs or []
|
||||||
if doc._id? and doc._id.toString() == doc_id.toString()
|
if doc?._id? and doc._id.toString() == doc_id.toString()
|
||||||
return {
|
return {
|
||||||
doc: doc
|
doc: doc
|
||||||
mongoPath: "#{currentPath}.docs.#{i}"
|
mongoPath: "#{currentPath}.docs.#{i}"
|
||||||
|
|
Loading…
Reference in a new issue