-
Notifications
You must be signed in to change notification settings - Fork 455
Open
Description
Hey ShareDB's team!
While using https://github.com/ottypes/json1 with ShareDB, I found a small problem in Doc.prototype._rollback. It automatically uses JSON1.type.invert but since we don't use invertible operations (our remove ops do not contain the removed data), it does not work.
Lines 950 to 957 in fa9179d
| if ('op' in op && op.type.invert) { | |
| op.op = op.type.invert(op.op); | |
| // Transform the undo operation by any pending ops. | |
| for (var i = 0; i < this.pendingOps.length; i++) { | |
| var transformErr = transformX(this.pendingOps[i], op); | |
| if (transformErr) return this._hardRollback(transformErr); | |
| } |
Moreover JSON1 support for invertible operations and composition is known to not be without flaws.
Do you think we could introduce a configuration option to deactivate this functionality?
Metadata
Metadata
Assignees
Labels
No labels