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

Merge pull request #1701 from sharelatex/bg-send-last-version

send last version to docupdater

GitOrigin-RevId: fab3415fdb1f37982d8089a9d0b35fd06f7459ae
Brian Gough 7 лет назад
Родитель
Сommit
f3960db1ad
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      services/web/public/js/libs/sharejs.js

+ 3 - 1
services/web/public/js/libs/sharejs.js

@@ -1304,7 +1304,9 @@ define(['ace/ace'], function () {
         this.emit('flipped_pending_to_inflight');
 
         // console.log "SENDING OP TO SERVER", @inflightOp, @version
-        return this.connection.send({ doc: this.name, op: this.inflightOp, v: this.version });
+        var lastVersion = this.__lastVersion;
+        this.__lastVersion = this.version;
+        return this.connection.send({ doc: this.name, op: this.inflightOp, v: this.version, lastV: lastVersion});
       }
 
       // Submit an op to the server. The op maybe held for a little while before being sent, as only one