Skip to content

Commit 99a73b1

Browse files
committed
Revert "feat-jan-op增加版本返回"
This reverts commit 1fe9959 返回版本信息有误,本地提交需要在提交callback里获取
1 parent 1fe9959 commit 99a73b1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/client/doc.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ Doc.prototype._otApply = function(op, source) {
583583
'Cannot apply op to uncreated document. ' + this.collection + '.' + this.id
584584
);
585585
}
586-
var extra = {v: source ? this.version : op.v, serverTime: op.serverTime};
586+
587587
// NB: If we need to add another argument to this event, we should consider
588588
// the fact that the 'op' event has op.src as its 3rd argument
589589
this.emit('before op batch', op.op, source);
@@ -621,7 +621,7 @@ Doc.prototype._otApply = function(op, source) {
621621
this.data = this.type.apply(this.data, componentOp.op);
622622
this.emit('op', componentOp.op, source, op.src);
623623
}
624-
this.emit('op batch', op.op, source, extra);
624+
this.emit('op batch', op.op, source);
625625
// Pop whatever was submitted since we started applying this op
626626
this._popApplyStack(stackLength);
627627
return;
@@ -638,7 +638,7 @@ Doc.prototype._otApply = function(op, source) {
638638
// For ops from other clients, this will be after the op has been
639639
// committed to the database and published
640640
this.emit('op', op.op, source, op.src);
641-
this.emit('op batch', op.op, source, extra);
641+
this.emit('op batch', op.op, source);
642642
return;
643643
}
644644

0 commit comments

Comments
 (0)