Skip to content

Commit

Permalink
Improve style of checking members nullability
Browse files Browse the repository at this point in the history
  • Loading branch information
joyliu-q authored Jan 6, 2024
1 parent 016e004 commit a3f4375
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/Team/Teams.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ interface ITeams {
const TEAM_LEAD = 'Team Lead'

const leadsFirst = (members: IMember[]): IMember[] => {
if (members === null) {
return []
}
if (!members) return []

return members.sort((m1, m2): number => {
const isLead1 = m1.roles.indexOf(TEAM_LEAD) !== -1
Expand Down

0 comments on commit a3f4375

Please sign in to comment.