mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-13 18:45:43 +05:00
Fix scrambled data in sheets on reconnect
This commit is contained in:
parent
4c915f9e5a
commit
ca95af082d
@ -1156,6 +1156,14 @@ define([
|
||||
};
|
||||
|
||||
var handleChanges = function (obj, send) {
|
||||
if (APP.history) {
|
||||
send({
|
||||
type: "unSaveLock",
|
||||
index: ooChannel.cpIndex,
|
||||
time: +new Date()
|
||||
});
|
||||
return;
|
||||
}
|
||||
// Add a new entry to the pendingChanges object.
|
||||
// If we can't send the patch within 30s, force a page reload
|
||||
var uid = Util.uid();
|
||||
|
||||
@ -87,8 +87,10 @@ define([
|
||||
chan.wc = wc;
|
||||
chan.sendMsg = function (msg, cb) {
|
||||
cb = cb || function () {};
|
||||
var hash = msg.slice(0, 64);
|
||||
wc.bcast(msg).then(function () {
|
||||
chan.history.push(msg);
|
||||
chan.lastKnownHash = hash;
|
||||
cb();
|
||||
}, function (err) {
|
||||
cb({error: err});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user