Skip to content

Commit ac808cd

Browse files
committed
Switch back to if else.
1 parent 03a3cbd commit ac808cd

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/commands/members/add.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ export default class MembersAdd extends Command {
2626
const {role, team} = flags
2727
const {email} = args
2828

29-
await ((await isTeamInviteFeatureEnabled(team, this.heroku))
30-
? inviteMemberToTeam(email, role, team, this.heroku)
31-
: addMemberToTeam(email, role, team, this.heroku)
32-
)
29+
const teamInviteEnabled = await isTeamInviteFeatureEnabled(team, this.heroku)
30+
if (teamInviteEnabled) {
31+
await inviteMemberToTeam(email, role, team, this.heroku)
32+
} else {
33+
await addMemberToTeam(email, role, team, this.heroku)
34+
}
3335
}
3436
}

0 commit comments

Comments
 (0)