Просмотр исходного кода

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

Brian Gough 10 лет назад
Родитель
Сommit
9b2cd11cd4
1 измененных файлов с 1 добавлено и 0 удалено
  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) ->