fix(ot): keep pendingOps in StaleWithBuffer during applyClient

Co-authored-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson
2026-03-18 20:24:53 +01:00
committed by Philip Molares
parent c4841575c9
commit 5a5e12a693
2 changed files with 6 additions and 2 deletions

View File

@@ -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) {

View File

@@ -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) {