From 90f1ff9e4686cce7aa490d5fce58dd3f33cbaa0b Mon Sep 17 00:00:00 2001 From: Patrick Shaw Date: Wed, 1 Jun 2022 10:39:24 +1000 Subject: [PATCH] Applied a fix for captureTimeout positive infinity not working as desired --- src/utils/UndoManager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/UndoManager.js b/src/utils/UndoManager.js index 25e68c63..9f712d16 100644 --- a/src/utils/UndoManager.js +++ b/src/utils/UndoManager.js @@ -188,7 +188,7 @@ export class UndoManager extends Observable { this.undoing = false this.redoing = false this.doc = /** @type {Doc} */ (this.scope[0].doc) - this.lastChange = 0 + this.lastChange = Number.NEGATIVE_INFINITY; this.ignoreRemoteMapChanges = ignoreRemoteMapChanges /** * @param {Transaction} transaction @@ -316,7 +316,7 @@ export class UndoManager extends Observable { * */ stopCapturing () { - this.lastChange = 0 + this.lastChange = Number.NEGATIVE_INFINITY; } /**