mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
replace Array#forEach() ... Array#push with Array#map
This commit is contained in:
parent
ea3144492e
commit
66c2140911
2 changed files with 7 additions and 10 deletions
|
@ -187,15 +187,15 @@ BlazeComponent.extendComponent({
|
||||||
return ret;
|
return ret;
|
||||||
},
|
},
|
||||||
boardLists(boardId) {
|
boardLists(boardId) {
|
||||||
let boardLists = [];
|
|
||||||
const lists = Lists.find({ 'boardId': boardId, 'archived': false },{sort: ['sort','asc']});
|
const lists = Lists.find({ 'boardId': boardId, 'archived': false },{sort: ['sort','asc']});
|
||||||
/* Bug Board icons random dance https://github.com/wekan/wekan/issues/4214
|
/* Bug Board icons random dance https://github.com/wekan/wekan/issues/4214
|
||||||
lists.forEach(list => {
|
const ret = lists.map(list => {
|
||||||
let cardCount = Cards.find({ 'boardId': boardId, 'listId': list._id }).count()
|
let cardCount = ReactiveCache.getCards({ 'boardId': boardId, 'listId': list._id }).length;
|
||||||
boardLists.push(`${list.title}: ${cardCount}`);
|
return `${list.title}: ${cardCount}`;
|
||||||
});
|
});
|
||||||
|
return ret;
|
||||||
*/
|
*/
|
||||||
return boardLists;
|
return [];
|
||||||
},
|
},
|
||||||
|
|
||||||
boardMembers(boardId) {
|
boardMembers(boardId) {
|
||||||
|
|
|
@ -162,11 +162,8 @@ Utils = {
|
||||||
},
|
},
|
||||||
|
|
||||||
archivedBoardIds() {
|
archivedBoardIds() {
|
||||||
const archivedBoards = [];
|
const ret = ReactiveCache.getBoards({ archived: false }).map(board => board._id);
|
||||||
ReactiveCache.getBoards({ archived: false }).forEach(board => {
|
return ret;
|
||||||
archivedBoards.push(board._id);
|
|
||||||
});
|
|
||||||
return archivedBoards;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
dueCardsView() {
|
dueCardsView() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue