mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
Invert conditions to improve readability
This commit is contained in:
parent
cdad5c3325
commit
9e7b142bb7
3 changed files with 46 additions and 65 deletions
|
@ -119,15 +119,11 @@ const loadBroadcastJS = (socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
|
|||
const alines = this.alines;
|
||||
for (let i = 0; i < alines.length; i++) {
|
||||
Changeset.eachAttribNumber(alines[i], (n) => {
|
||||
if (!seenNums[n]) {
|
||||
seenNums[n] = true;
|
||||
if (this.apool.getAttribKey(n) === 'author') {
|
||||
const a = this.apool.getAttribValue(n);
|
||||
if (a) {
|
||||
authors.push(a);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (seenNums[n]) return;
|
||||
seenNums[n] = true;
|
||||
if (this.apool.getAttribKey(n) !== 'author') return;
|
||||
const a = this.apool.getAttribValue(n);
|
||||
if (a) authors.push(a);
|
||||
});
|
||||
}
|
||||
authors.sort();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue