mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-08 03:02:03 +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
|
// compose Changesets
|
||||||
|
let r;
|
||||||
try {
|
try {
|
||||||
let changeset = changesets[startNum];
|
let changeset = changesets[startNum];
|
||||||
let pool = pad.apool();
|
let pool = pad.apool();
|
||||||
|
|
||||||
for (let r = startNum + 1; r < endNum; r++) {
|
for (r = startNum + 1; r < endNum; r++) {
|
||||||
let cs = changesets[r];
|
let cs = changesets[r];
|
||||||
changeset = Changeset.compose(changeset, cs, pool);
|
changeset = Changeset.compose(changeset, cs, pool);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue