fix null case

This commit is contained in:
Henrique Dias 2015-08-24 12:22:17 -03:00
parent fcbe4aa925
commit f910e63e90

View file

@ -36,7 +36,7 @@ module.exports = UpdatesManager =
MongoManager.insertCompressedUpdates project_id, doc_id, compressedUpdates, temporary,(error) -> MongoManager.insertCompressedUpdates project_id, doc_id, compressedUpdates, temporary,(error) ->
return callback(error) if error? return callback(error) if error?
logger.log project_id: project_id, doc_id: doc_id, rawUpdatesLength: length, compressedUpdatesLength: compressedUpdates.length, "compressed doc updates" logger.log project_id: project_id, doc_id: doc_id, rawUpdatesLength: length, compressedUpdatesLength: compressedUpdates.length, "compressed doc updates"
if lastCompressedUpdate.inS3? if lastCompressedUpdate?.inS3?
MongoManager.remarkDocHistoryAsArchived doc_id, callback MongoManager.remarkDocHistoryAsArchived doc_id, callback
else else
callback() callback()