Fixed "Search All Boards" instructions are gone.

Thanks to ClaudiaK21 and xet7 !

Fixes #3882
This commit is contained in:
Lauri Ojansivu 2021-06-29 13:38:57 +03:00
parent a0945d2a2e
commit 30ffcc9246
2 changed files with 45 additions and 38 deletions

View file

@ -1422,13 +1422,18 @@ if (Meteor.isServer) {
myLabelNames() {
let names = [];
Boards.userBoards(Meteor.userId()).forEach(board => {
names = names.concat(
board.labels
.filter(label => !!label.name)
.map(label => {
return label.name;
}),
);
// Only return labels when they exist.
if (board.labels !== undefined) {
names = names.concat(
board.labels
.filter(label => !!label.name)
.map(label => {
return label.name;
}),
);
} else {
return [];
}
});
return _.uniq(names).sort();
},