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.
This commit is contained in:
Alexander Sulfrian 2015-09-20 15:55:23 +02:00
parent ec92f84f41
commit f4a68a0f7d
4 changed files with 5 additions and 5 deletions

View file

@ -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();
});