diff --git a/src/interactions/leaderAdd.js b/src/interactions/leaderAdd.js index efa0b5ed..e4f54920 100644 --- a/src/interactions/leaderAdd.js +++ b/src/interactions/leaderAdd.js @@ -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( () => {