From f85841aa8068e3015fab67d8b7bef09a173f98e1 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 3 Aug 2022 07:08:00 -0700 Subject: [PATCH] Replace pack with regex instead of assuming "pack:" --- src/components/emoji_picker/emoji_picker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js index edcb8242..49438a4b 100644 --- a/src/components/emoji_picker/emoji_picker.js +++ b/src/components/emoji_picker/emoji_picker.js @@ -173,8 +173,8 @@ const EmojiPicker = { const emojiPacks = [] customEmojis.forEach((pack, id) => { emojiPacks.push({ - id: id.substring(5), - text: startCase(id.substring(5)), + id: id.replace(/^pack:/, ''), + text: startCase(id.replace(/^pack:/, '')), first: pack[0], emojis: this.filterByKeyword(pack) })