Browse Source

Fix bug where you get a "null" option in @-mention autocomplete (#649)

Drew Fisher 9 years ago
parent
commit
3643bd4996
1 changed files with 2 additions and 2 deletions
  1. 2 2
      client/components/main/editor.js

+ 2 - 2
client/components/main/editor.js

@@ -10,7 +10,7 @@ Template.editor.onRendered(() => {
       search(term, callback) {
         callback(Emoji.values.map((emoji) => {
           return emoji.includes(term) ? emoji : null;
-        }));
+        }).filter(emoji => !!emoji));
       },
       template(value) {
         const imgSrc = Emoji.baseImagePath + value;
@@ -31,7 +31,7 @@ Template.editor.onRendered(() => {
         callback(currentBoard.activeMembers().map((member) => {
           const username = Users.findOne(member.userId).username;
           return username.includes(term) ? username : null;
-        }));
+        }).filter(username => !!username));
       },
       template(value) {
         return value;