mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-21 00:13:37 +00:00
handle case where index does not exist
This commit is contained in:
parent
e8b3fb5be6
commit
3175f6d3a6
1 changed files with 1 additions and 1 deletions
|
@ -281,7 +281,7 @@ module.exports = PackManager =
|
|||
return callback(err) if err?
|
||||
return callback() if not historyPacks?
|
||||
# select only the new packs not already in the index
|
||||
newPacks = (pack for pack in historyPacks when not indexResult[pack._id]?)
|
||||
newPacks = (pack for pack in historyPacks when not indexResult?[pack._id]?)
|
||||
newPacks = (_.omit(pack, 'doc_id', 'project_id', 'n', 'sz') for pack in newPacks)
|
||||
logger.log {project_id, doc_id, n: newPacks.length}, "found new packs"
|
||||
callback(null, newPacks)
|
||||
|
|
Loading…
Add table
Reference in a new issue