From 28aafc6370d0323f4aa81bf70cae78e70f91f398 Mon Sep 17 00:00:00 2001 From: Dawid Kisielewski Date: Tue, 10 Oct 2023 18:23:49 +0200 Subject: [PATCH] Change to unshift --- lib/client/doc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/client/doc.js b/lib/client/doc.js index 871c76a0b..b8c700de2 100644 --- a/lib/client/doc.js +++ b/lib/client/doc.js @@ -1075,7 +1075,7 @@ Doc.prototype._hardRollback = function(err) { ); } - if (inflightOp) pendingOps.push(inflightOp); + if (inflightOp) pendingOps.unshift(inflightOp); var allOpsHadCallbacks = !!pendingOps.length; for (var i = 0; i < pendingOps.length; i++) { allOpsHadCallbacks = util.callEach(pendingOps[i].callbacks, err) && allOpsHadCallbacks;