Applied a fix for captureTimeout positive infinity not working as desired

This commit is contained in:
Patrick Shaw 2022-06-01 10:39:24 +10:00
parent 854d706cbf
commit 90f1ff9e46

View File

@ -188,7 +188,7 @@ export class UndoManager extends Observable {
this.undoing = false this.undoing = false
this.redoing = false this.redoing = false
this.doc = /** @type {Doc} */ (this.scope[0].doc) this.doc = /** @type {Doc} */ (this.scope[0].doc)
this.lastChange = 0 this.lastChange = Number.NEGATIVE_INFINITY;
this.ignoreRemoteMapChanges = ignoreRemoteMapChanges this.ignoreRemoteMapChanges = ignoreRemoteMapChanges
/** /**
* @param {Transaction} transaction * @param {Transaction} transaction
@ -316,7 +316,7 @@ export class UndoManager extends Observable {
* *
*/ */
stopCapturing () { stopCapturing () {
this.lastChange = 0 this.lastChange = Number.NEGATIVE_INFINITY;
} }
/** /**