mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
Simplify filter predicate
Untangle a double negative to make this line shorter and easier to read. // FREEBIE
This commit is contained in:
parent
0fa1069a93
commit
9872b59355
2 changed files with 2 additions and 2 deletions
|
@ -38249,7 +38249,7 @@ axolotlInternal.RecipientRecord = function() {
|
|||
if (group === undefined)
|
||||
throw new Error("Tried to update numbers for unknown group");
|
||||
|
||||
if (numbers.filter(function(number) { return !textsecure.utils.isNumberSane(number); }).length > 0)
|
||||
if (numbers.filter(textsecure.utils.isNumberSane).length < numbers.length)
|
||||
throw new Error("Invalid number in new group members");
|
||||
|
||||
if (group.numbers.filter(function(number) { return numbers.indexOf(number) < 0 }).length > 0)
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
if (group === undefined)
|
||||
throw new Error("Tried to update numbers for unknown group");
|
||||
|
||||
if (numbers.filter(function(number) { return !textsecure.utils.isNumberSane(number); }).length > 0)
|
||||
if (numbers.filter(textsecure.utils.isNumberSane).length < numbers.length)
|
||||
throw new Error("Invalid number in new group members");
|
||||
|
||||
if (group.numbers.filter(function(number) { return numbers.indexOf(number) < 0 }).length > 0)
|
||||
|
|
Loading…
Reference in a new issue