diff options
Diffstat (limited to 'client/components/sidebar')
-rw-r--r-- | client/components/sidebar/sidebar.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/client/components/sidebar/sidebar.js b/client/components/sidebar/sidebar.js index 4bb53d4d..35651622 100644 --- a/client/components/sidebar/sidebar.js +++ b/client/components/sidebar/sidebar.js @@ -131,9 +131,12 @@ Template.memberPopup.events({ }, 'click .js-change-role': Popup.open('changePermissions'), 'click .js-remove-member': Popup.afterConfirm('removeMember', function() { - const currentBoard = Boards.findOne(Session.get('currentBoard')); + const boardId = Session.get('currentBoard'); const memberId = this.userId; - currentBoard.removeMember(memberId); + Cards.find({ boardId, members: memberId }).forEach((card) => { + card.unassignMember(memberId); + }); + Boards.findOne(boardId).removeMember(memberId); Popup.close(); }), 'click .js-leave-member'() { |