From f3960db1adc45a9e064540eb3dfe09b423b012b6 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Tue, 16 Apr 2019 09:23:11 +0100 Subject: [PATCH] Merge pull request #1701 from sharelatex/bg-send-last-version send last version to docupdater GitOrigin-RevId: fab3415fdb1f37982d8089a9d0b35fd06f7459ae --- services/web/public/js/libs/sharejs.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/web/public/js/libs/sharejs.js b/services/web/public/js/libs/sharejs.js index d829e1d23a..35574706b0 100644 --- a/services/web/public/js/libs/sharejs.js +++ b/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