Explorar el Código

don't try to append to packs when using the old op code

Brian Gough hace 10 años
padre
commit
9b2cd11cd4
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      services/track-changes/app/coffee/UpdatesManager.coffee

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

@@ -50,6 +50,7 @@ module.exports = UpdatesManager =
 			if temporary and (not lastCompressedUpdate? or lastCompressedUpdate.pack?) # handle pack append as a special case
 				UpdatesManager._updatePack project_id, doc_id, rawUpdates, temporary, lastCompressedUpdate, lastVersion, callback
 			else #use the existing op code
+				lastCompressedUpdate = null if lastCompressedUpdate?.pack? # can't handle packs with op code
 				UpdatesManager._updateOp project_id, doc_id, rawUpdates, temporary, lastCompressedUpdate, lastVersion, callback
 
 	_updatePack: (project_id, doc_id, rawUpdates, temporary, lastCompressedUpdate, lastVersion, callback) ->