From f4a68a0f7d5d7f4d2ca84dfa2d4ecf85a2f838a6 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Sun, 20 Sep 2015 15:55:23 +0200 Subject: Fix Popup.afterCommit We need to use "function() {}" instead of the ES6 style "() {}" with popup.afterCommit because we need the original value of "this" inside the callback. --- client/components/lists/listHeader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/components/lists/listHeader.js') diff --git a/client/components/lists/listHeader.js b/client/components/lists/listHeader.js index d4891fec..a893e873 100644 --- a/client/components/lists/listHeader.js +++ b/client/components/lists/listHeader.js @@ -34,7 +34,7 @@ Template.listActionPopup.events({ Popup.close(); }, 'click .js-move-cards': Popup.open('listMoveCards'), - 'click .js-archive-cards': Popup.afterConfirm('listArchiveCards', () => { + 'click .js-archive-cards': Popup.afterConfirm('listArchiveCards', function() { this.allCards().forEach((card) => { card.archive(); }); -- cgit v1.2.3-1-g7c22