mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-05-11 07:06:26 +02: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
@ -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…
x
Reference in New Issue
Block a user