summaryrefslogtreecommitdiffstats
path: root/client/components/boards/boardList.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/boards/boardList.js')
-rw-r--r--client/components/boards/boardList.js14
1 files changed, 3 insertions, 11 deletions
diff --git a/client/components/boards/boardList.js b/client/components/boards/boardList.js
index f902cc84..e86d16ab 100644
--- a/client/components/boards/boardList.js
+++ b/client/components/boards/boardList.js
@@ -9,25 +9,17 @@ BlazeComponent.extendComponent({
});
},
- starredBoards: function() {
- var cursor = Boards.find({
- _id: { $in: Meteor.user().profile.starredBoards || [] }
- }, {
- sort: ['title']
- });
- return cursor.count() === 0 ? null : cursor;
- },
-
isStarred: function() {
var user = Meteor.user();
- return user && user.hasStarred(this._id);
+ return user && user.hasStarred(this.currentData()._id);
},
events: function() {
return [{
'click .js-add-board': Popup.open('createBoard'),
'click .js-star-board': function(evt) {
- Meteor.user().toggleBoardStar(this._id);
+ var boardId = this.currentData()._id;
+ Meteor.user().toggleBoardStar(boardId);
evt.preventDefault();
}
}];