Browse Source

Only show label names on global search for type='board'

John R. Supplee 4 years ago
parent
commit
b419e17cac
1 changed files with 11 additions and 9 deletions
  1. 11 9
      models/boards.js

+ 11 - 9
models/boards.js

@@ -1420,15 +1420,17 @@ 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;
-            }),
-        );
-      });
+      Boards.userBoards(Meteor.userId(), false, { type: 'board' }).forEach(
+        board => {
+          names = names.concat(
+            board.labels
+              .filter(label => !!label.name)
+              .map(label => {
+                return label.name;
+              }),
+          );
+        },
+      );
       return _.uniq(names).sort();
     },
     myBoardNames() {