diff options
Diffstat (limited to 'client/components/cards')
-rw-r--r-- | client/components/cards/cardDetails.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index 7dcadfe3..048a7e1a 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -956,7 +956,12 @@ BlazeComponent.extendComponent({ }, 'click .js-delete': Popup.afterConfirm('cardDelete', function() { Popup.close(); - Cards.remove(this._id); + // verify that there are no linked cards + if (Cards.find({ linkedId: this._id }).count() === 0) { + Cards.remove(this._id); + } else { + // TODO popup... + } Utils.goBoardId(this.boardId); }), 'change .js-field-parent-board'(event) { |