Przeglądaj źródła

don't try to getLastCompressedUpdates from packs

Brian Gough 11 lat temu
rodzic
commit
d8dc56b031

+ 1 - 0
services/track-changes/app/coffee/MongoManager.coffee

@@ -11,6 +11,7 @@ module.exports = MongoManager =
 			.limit(1)
 			.limit(1)
 			.toArray (error, compressedUpdates) ->
 			.toArray (error, compressedUpdates) ->
 				return callback(error) if error?
 				return callback(error) if error?
+				return callback null, null if compressedUpdates[0]?.pack? # cannot pop from a pack
 				return callback null, compressedUpdates[0] or null
 				return callback null, compressedUpdates[0] or null
 
 
 	# only used in this module
 	# only used in this module