From 35c030d834a428f0e9acc3a2fd9b9258c0c24ff5 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Thu, 6 Mar 2025 10:36:18 +0100 Subject: [PATCH] improve reject update example --- tests/undo-redo.tests.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/undo-redo.tests.js b/tests/undo-redo.tests.js index 487601e2..faf42aff 100644 --- a/tests/undo-redo.tests.js +++ b/tests/undo-redo.tests.js @@ -152,7 +152,9 @@ export const testRejectUpdateExample = _tc => { try { Y.applyUpdate(ydoc, update, 'remote change') } finally { - um.undo() + while (um.undoStack.length) { + um.undo() + } um.destroy() ydoc.store.pendingDs = beforePendingDs ydoc.store.pendingStructs = null