mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-24 09:26:14 -04:00
do not crash when encountering mismatched compositions. log the changesets and padid
This commit is contained in:
parent
38a4f1be5f
commit
7719117e1e
2 changed files with 9 additions and 5 deletions
|
@ -1629,10 +1629,14 @@ function composePadChangesets(padId, startNum, endNum, callback)
|
|||
changeset = changesets[startNum];
|
||||
var pool = pad.apool();
|
||||
|
||||
for(var r=startNum+1;r<endNum;r++)
|
||||
{
|
||||
var cs = changesets[r];
|
||||
changeset = Changeset.compose(changeset, cs, pool);
|
||||
try {
|
||||
for(var r=startNum+1;r<endNum;r++) {
|
||||
var cs = changesets[r];
|
||||
changeset = Changeset.compose(changeset, cs, pool);
|
||||
}
|
||||
} catch(e){
|
||||
console.warn("failed to compose cs in pad:",padId);
|
||||
return;
|
||||
}
|
||||
|
||||
callback(null);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue