Fix Labels search (Uncaught TypeError: t.name is undefined)

This commit is contained in:
Ben0it-T 2021-12-25 18:30:41 +01:00
parent 27ee16ea1e
commit 8aa816149f

View file

@ -363,6 +363,9 @@ BlazeComponent.extendComponent({
const currentBoard = Boards.findOne(Session.get('currentBoard'));
callback(
$.map(currentBoard.labels, label => {
if (label.name == undefined) {
label.name = "";
}
if (
label.name.indexOf(term) > -1 ||
label.color.indexOf(term) > -1