mirror of https://github.com/status-im/codimd.git
Fix socket io doc event should setDoc when revision mismatch and no outstanding operation
This commit is contained in:
parent
5ad7d61499
commit
3db1214ecf
|
@ -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 New Issue