Fix socket io doc event should setDoc when revision mismatch and no outstanding operation
This commit is contained in:
parent
5ad7d61499
commit
3db1214ecf
1 changed files with 1 additions and 1 deletions
|
@ -2651,7 +2651,7 @@ socket.on('doc', function (obj) {
|
|||
obj = JSON.parse(obj);
|
||||
var body = obj.str;
|
||||
var bodyMismatch = editor.getValue() !== body;
|
||||
var setDoc = !cmClient || (cmClient && cmClient.revision === -1) || obj.force;
|
||||
var setDoc = !cmClient || (cmClient && (cmClient.revision === -1 || (cmClient.revision !== obj.revision && Object.keys(cmClient.state).length <= 0))) || obj.force;
|
||||
|
||||
saveInfo();
|
||||
if (setDoc && bodyMismatch) {
|
||||
|
|
Loading…
Reference in a new issue