Skip to content

Commit

Permalink
Change return to use ternary operator
Browse files Browse the repository at this point in the history
  • Loading branch information
douglaslise committed Oct 7, 2022
1 parent 2f1738e commit 1bea40f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/recurly/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,7 @@ function findCardGroup (number, partial) {
return findInRange(group.ranges, cardNumber);
}));

if (group) {
return { type, group };
}
return group ? { type, group } : false;
}).filter(function (typeWithGroup) { return !!typeWithGroup; });

return types.length == 1 && types[0];
Expand Down

0 comments on commit 1bea40f

Please sign in to comment.