浏览代码

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

Ben0it-T 3 年之前
父节点
当前提交
8aa816149f
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      client/components/lists/listBody.js

+ 3 - 0
client/components/lists/listBody.js

@@ -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