mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
check that content exists before adding it to getAllDocs.
causing error which I think is blowing up the mongo driver elsewhere
This commit is contained in:
parent
766bfbf5ef
commit
21a01d94d4
1 changed files with 7 additions and 6 deletions
|
@ -48,12 +48,13 @@ module.exports = ProjectEntityHandler =
|
|||
for folderPath, folder of folders
|
||||
for doc in folder.docs
|
||||
content = docContents[doc._id.toString()]
|
||||
docs[path.join(folderPath, doc.name)] = {
|
||||
_id: doc._id
|
||||
name: doc.name
|
||||
lines: content.lines
|
||||
rev: content.rev
|
||||
}
|
||||
if content?
|
||||
docs[path.join(folderPath, doc.name)] = {
|
||||
_id: doc._id
|
||||
name: doc.name
|
||||
lines: content.lines
|
||||
rev: content.rev
|
||||
}
|
||||
logger.log count:_.keys(docs).length, project_id:project_id, "returning docs for project"
|
||||
callback null, docs
|
||||
|
||||
|
|
Loading…
Reference in a new issue