mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
bin scripts: Use destructuring instead of long condition checks
This commit is contained in:
parent
f03c4bd7f7
commit
92cd2cc760
3 changed files with 6 additions and 8 deletions
|
@ -66,13 +66,13 @@ npm.load({}, async () => {
|
|||
}
|
||||
|
||||
// check if there is a atext in the keyRevisions
|
||||
if (revisions[keyRev].meta == null || revisions[keyRev].meta.atext == null) {
|
||||
let {meta: {atext} = {}} = revisions[keyRev];
|
||||
if (atext == null) {
|
||||
console.error(`[${pad.id}] Missing atext in revision ${keyRev}`);
|
||||
continue;
|
||||
}
|
||||
|
||||
const apool = pad.pool;
|
||||
let atext = revisions[keyRev].meta.atext;
|
||||
for (let rev = keyRev + 1; rev <= keyRev + 100 && rev <= head; rev++) {
|
||||
try {
|
||||
const cs = revisions[rev].changeset;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue