about summary refs log tree commit diff
path: root/app/javascript/flavours
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2018-06-15 12:10:45 -0500
committerThibG <thib@sitedethib.com>2018-06-15 22:10:50 +0200
commit8cafeedc25ce5d6a12a06819690fb4e1cdc6c1b8 (patch)
treec08a8f0ffd43b73d7841ee08bab88105d5fa2918 /app/javascript/flavours
parentafceef74c2377192f100b9307068895ec0ec7d45 (diff)
Port 85470ec872a39c475d872f685dadeac849832a98 to glitch emoji picker.
Fixes #541.
Diffstat (limited to 'app/javascript/flavours')
-rw-r--r--app/javascript/flavours/glitch/util/emoji/emoji_mart_search_light.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/util/emoji/emoji_mart_search_light.js b/app/javascript/flavours/glitch/util/emoji/emoji_mart_search_light.js
index bf511d290..36351ec02 100644
--- a/app/javascript/flavours/glitch/util/emoji/emoji_mart_search_light.js
+++ b/app/javascript/flavours/glitch/util/emoji/emoji_mart_search_light.js
@@ -54,9 +54,13 @@ function addCustomToPool(custom, pool) {
   index = {};
 }
 
-function search(value, { emojisToShowFilter, maxResults, include, exclude, custom = [] } = {}) {
-  if (customEmojisList !== custom)
-    addCustomToPool(custom, originalPool);
+function search(value, { emojisToShowFilter, maxResults, include, exclude, custom } = {}) {
+  if (custom !== undefined) {
+    if (customEmojisList !== custom)
+      addCustomToPool(custom, originalPool);
+  } else {
+    custom = [];
+  }
 
   maxResults = maxResults || 75;
   include = include || [];