From 5a5e12a693e807eae6a2cb6c8ce618afc3825aea Mon Sep 17 00:00:00 2001 From: Erik Michelson Date: Wed, 18 Mar 2026 20:24:53 +0100 Subject: [PATCH] fix(ot): keep pendingOps in StaleWithBuffer during applyClient Co-authored-by: Philip Molares Signed-off-by: Erik Michelson --- lib/ot/client.js | 4 +++- public/vendor/ot/client.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/ot/client.js b/lib/ot/client.js index c4384e88..4c90d8ce 100755 --- a/lib/ot/client.js +++ b/lib/ot/client.js @@ -282,7 +282,9 @@ ot.Client = (function (global) { StaleWithBuffer.prototype.applyClient = function (client, operation) { var buffer = this.buffer.compose(operation); - return new StaleWithBuffer(this.acknowlaged, buffer, client, this.revision); + var swb = new StaleWithBuffer(this.acknowlaged, buffer, client, this.revision); + swb.pendingOps = this.pendingOps; + return swb; }; StaleWithBuffer.prototype.applyServer = function (client, revision, operation) { diff --git a/public/vendor/ot/client.js b/public/vendor/ot/client.js index c4384e88..4c90d8ce 100644 --- a/public/vendor/ot/client.js +++ b/public/vendor/ot/client.js @@ -282,7 +282,9 @@ ot.Client = (function (global) { StaleWithBuffer.prototype.applyClient = function (client, operation) { var buffer = this.buffer.compose(operation); - return new StaleWithBuffer(this.acknowlaged, buffer, client, this.revision); + var swb = new StaleWithBuffer(this.acknowlaged, buffer, client, this.revision); + swb.pendingOps = this.pendingOps; + return swb; }; StaleWithBuffer.prototype.applyServer = function (client, revision, operation) {