Open
Description
Hi I have the following code:
shareDoc.on('op', (ops, source) => {
for (let op of ops) {
this._dispatchOperation(op);
}
});
The _dispatchOperation
method gets called 4 times for each submitOp
with the same ops
object and source=true
.
Is this by design or is it a bug?
In my case it is not what I want, therefore I modified the code as follows.
this._lastOps = null;
shareDoc.on('op', (ops, source) => {
if (lodash.isEqual(ops, this._lastOps)) return;
this._lastOps = ops;
for (let op of ops) {
this._dispatchOperation(op);
}
});
Is this ok or the three op notifications that I am ignoring may be important?
Metadata
Metadata
Assignees
Labels
No labels