Skip to content

Commit

Permalink
Update leaderAdd.js
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwofford committed Sep 18, 2019
1 parent 814c25e commit 13c9a46
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/interactions/leaderAdd.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ const interactionLeaderAdd = (bot, message) => {
// ensure we can assign the leader to this club
console.log(taggedUser.leader)
console.log(commandUser.club.id, taggedUser.leader.fields['Clubs'])
const clubs = [
commandUser.club.id,
...taggedUser.leader.fields['Clubs'],
]
const clubs = taggedUser.leader.fields['Clubs'] || []
clubs.push(commandUser.club.id)
console.log(clubs)
return airPatch('Leaders', taggedUser.leader.id, { Clubs: clubs }).then(
() => {
Expand Down

0 comments on commit 13c9a46

Please sign in to comment.