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
pull/3740/head
Christian Schröder 2020-04-15 00:49:11 +02:00 committed by muxator
parent 4ddcaefed2
commit f0fdb94eb0
1 changed files with 2 additions and 1 deletions

View File

@ -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);
}