mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-20 06:29:53 +01:00
PadMessageHandler: fix for scoping error hiding original error
`r` is undefined outside of the for loop, but used in the catch block of the try statement
This commit is contained in:
parent
4ddcaefed2
commit
f0fdb94eb0
1 changed files with 2 additions and 1 deletions
|
@ -1429,11 +1429,12 @@ async function composePadChangesets (padId, startNum, endNum)
|
|||
}));
|
||||
|
||||
// compose Changesets
|
||||
let r;
|
||||
try {
|
||||
let changeset = changesets[startNum];
|
||||
let pool = pad.apool();
|
||||
|
||||
for (let r = startNum + 1; r < endNum; r++) {
|
||||
for (r = startNum + 1; r < endNum; r++) {
|
||||
let cs = changesets[r];
|
||||
changeset = Changeset.compose(changeset, cs, pool);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue