diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js index 787fa2831..1414f1407 100644 --- a/client/components/boards/boardBody.js +++ b/client/components/boards/boardBody.js @@ -46,7 +46,7 @@ BlazeComponent.extendComponent({ // fix swimlanes sort field if there are null values const currentBoardData = Utils.getCurrentBoard(); const nullSortSwimlanes = currentBoardData.nullSortSwimlanes(); - if (nullSortSwimlanes.count() > 0) { + if (nullSortSwimlanes.length > 0) { const swimlanes = currentBoardData.swimlanes(); let count = 0; swimlanes.forEach(s => { diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index 2dfdde14c..697a6772d 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -463,14 +463,14 @@ BlazeComponent.extendComponent({ if (!this.selectedBoardId.get()) { return []; } - const swimlanes = Swimlanes.find( + const swimlanes = ReactiveCache.getSwimlanes( { boardId: this.selectedBoardId.get() }, { sort: { sort: 1 }, }); - if (swimlanes.count()) + if (swimlanes.length) this.selectedSwimlaneId.set(swimlanes.fetch()[0]._id); return swimlanes; }, @@ -746,7 +746,7 @@ BlazeComponent.extendComponent({ } else if (this.isSwimlaneTemplateSearch) { element.sort = ReactiveCache.getBoard(this.boardId) .swimlanes() - .count(); + .length; element.type = 'swimlane'; _id = element.copy(this.boardId); } else if (this.isBoardTemplateSearch) { diff --git a/client/components/sidebar/sidebarArchives.js b/client/components/sidebar/sidebarArchives.js index 3a84aaf09..f79e601ee 100644 --- a/client/components/sidebar/sidebarArchives.js +++ b/client/components/sidebar/sidebarArchives.js @@ -59,7 +59,7 @@ BlazeComponent.extendComponent({ }, archivedSwimlanes() { - return Swimlanes.find( + return ReactiveCache.getSwimlanes( { archived: true, boardId: Session.get('currentBoard'), diff --git a/client/lib/dialogWithBoardSwimlaneList.js b/client/lib/dialogWithBoardSwimlaneList.js index 130491265..77a30225f 100644 --- a/client/lib/dialogWithBoardSwimlaneList.js +++ b/client/lib/dialogWithBoardSwimlaneList.js @@ -65,7 +65,7 @@ export class DialogWithBoardSwimlaneList extends BlazeComponent { setFirstSwimlaneId() { try { const board = ReactiveCache.getBoard(this.selectedBoardId.get()); - const swimlaneId = board.swimlanes().fetch()[0]._id; + const swimlaneId = board.swimlanes()[0]._id; this.selectedSwimlaneId.set(swimlaneId); } catch (e) {} }