mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06: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
|
@ -54,8 +54,8 @@ npm.load({}, async () => {
|
|||
// console.log('Fetching', revNum)
|
||||
const revision = await db.get(`pad:${padId}:revs:${revNum}`);
|
||||
// check if there is a atext in the keyRevisions
|
||||
if (~keyRevisions.indexOf(revNum) &&
|
||||
(revision == null || revision.meta == null || revision.meta.atext == null)) {
|
||||
const {meta: {atext: revAtext} = {}} = revision || {};
|
||||
if (~keyRevisions.indexOf(revNum) && revAtext == null) {
|
||||
console.error(`No atext in key revision ${revNum}`);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue