Skip to content

Commit

Permalink
fix: update array.find to array.some and change require to import
Browse files Browse the repository at this point in the history
  • Loading branch information
k80bowman committed Mar 4, 2024
1 parent 652355e commit 9af6e84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/cli/src/commands/members/add.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Command, flags} from '@heroku-cli/command'
import {Args} from '@oclif/core'
import * as Heroku from '@heroku-cli/schema'
const {RoleCompletion} = require('@heroku-cli/command/lib/completions')
import {RoleCompletion} from '@heroku-cli/command/lib/completions'
import {addMemberToTeam, inviteMemberToTeam} from '../../lib/members/util'
export default class MembersAdd extends Command {
static topic = 'members';
Expand All @@ -22,7 +22,7 @@ export default class MembersAdd extends Command {
const email = args.email
const {body: groupFeatures} = await this.heroku.get<Heroku.TeamFeature[]>(`/teams/${team}/features`)

if (teamInfo.type === 'team' && groupFeatures.find(feature => {
if (teamInfo.type === 'team' && groupFeatures.some(feature => {
return feature.name === 'team-invite-acceptance' && feature.enabled
})) {
await inviteMemberToTeam(email, role, team, this.heroku)
Expand Down

0 comments on commit 9af6e84

Please sign in to comment.