Compare commits

...

2 Commits

Author SHA1 Message Date
Kevin Jahns
a2b62b0a58 13.5.38 2022-05-14 18:11:57 +02:00
Kevin Jahns
6febf51b1a fix captureTransaction 2022-05-14 18:10:19 +02:00
3 changed files with 7 additions and 8 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "yjs", "name": "yjs",
"version": "13.5.37", "version": "13.5.38",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "yjs", "name": "yjs",
"version": "13.5.37", "version": "13.5.38",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"lib0": "^0.2.49" "lib0": "^0.2.49"

View File

@@ -1,6 +1,6 @@
{ {
"name": "yjs", "name": "yjs",
"version": "13.5.37", "version": "13.5.38",
"description": "Shared Editing Library", "description": "Shared Editing Library",
"main": "./dist/yjs.cjs", "main": "./dist/yjs.cjs",
"module": "./dist/yjs.mjs", "module": "./dist/yjs.mjs",

View File

@@ -195,12 +195,11 @@ export class UndoManager extends Observable {
*/ */
this.afterTransactionHandler = transaction => { this.afterTransactionHandler = transaction => {
// Only track certain transactions // Only track certain transactions
if (this.captureTransaction(transaction) && ( if (
!this.captureTransaction(transaction) ||
!this.scope.some(type => transaction.changedParentTypes.has(type)) || !this.scope.some(type => transaction.changedParentTypes.has(type)) ||
( (!this.trackedOrigins.has(transaction.origin) && (!transaction.origin || !this.trackedOrigins.has(transaction.origin.constructor)))
!this.trackedOrigins.has(transaction.origin) && (!transaction.origin || !this.trackedOrigins.has(transaction.origin.constructor)) ) {
)
)) {
return return
} }
const undoing = this.undoing const undoing = this.undoing