From 8cafeedc25ce5d6a12a06819690fb4e1cdc6c1b8 Mon Sep 17 00:00:00 2001 From: David Yip Date: Fri, 15 Jun 2018 12:10:45 -0500 Subject: [PATCH] Port 85470ec872a39c475d872f685dadeac849832a98 to glitch emoji picker. Fixes #541. --- .../glitch/util/emoji/emoji_mart_search_light.js | 10 +++++++--- 1 file 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 bf511d29030..36351ec022d 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 || [];