Port 85470ec872 to glitch emoji picker.

Fixes #541.
This commit is contained in:
David Yip authored and ThibG committed 2018-06-15 22:10:50 +02:00
1 parent afceef74c2
commit 8cafeedc25
1 file changed
+7 -3
@@ -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 || [];