mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
temp patch for 1652
This commit is contained in:
parent
99dff9c4e5
commit
946289c221
1 changed files with 9 additions and 1 deletions
|
@ -1663,12 +1663,20 @@ exports.appendATextToAssembler = function (atext, assem) {
|
||||||
* @param cs {Changeset}
|
* @param cs {Changeset}
|
||||||
* @param pool {AtributePool}
|
* @param pool {AtributePool}
|
||||||
*/
|
*/
|
||||||
|
var lastEvent = null; // This is just a temporary measure to ensure we don't send the exact same changeset twice
|
||||||
|
// Documentation for this is available at https://github.com/ether/etherpad-lite/issues/1652
|
||||||
|
|
||||||
exports.prepareForWire = function (cs, pool) {
|
exports.prepareForWire = function (cs, pool) {
|
||||||
|
if(cs == lastEvent){
|
||||||
|
throw new Error("Not sending the same event twice...");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
var newPool = new AttributePool();
|
var newPool = new AttributePool();
|
||||||
var newCs = exports.moveOpsToNewPool(cs, pool, newPool);
|
var newCs = exports.moveOpsToNewPool(cs, pool, newPool);
|
||||||
|
lastEvent = cs;
|
||||||
return {
|
return {
|
||||||
translated: newCs,
|
translated: newCs,
|
||||||
pool: newPool
|
pool: newPool
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue