emoji-picker-react 4.5.11 → 4.5.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.5.11",
2
+ "version": "4.5.13",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -93,20 +93,19 @@ export function emojiByUnified(unified?: string): DataEmoji | undefined {
93
93
  export const allEmojis: DataEmojis = Object.values(emojis).flat();
94
94
 
95
95
  export function setCustomEmojis(customEmojis: CustomEmoji[]): void {
96
- if (!customEmojis || customEmojis.length === 0) {
97
- emojis[Categories.CUSTOM].length = 0;
98
- }
96
+ emojis[Categories.CUSTOM].length = 0;
99
97
 
100
98
  customEmojis.forEach(emoji => {
101
99
  const emojiData = customToRegularEmoji(emoji);
102
100
 
101
+ emojis[Categories.CUSTOM].push(emojiData as never);
102
+
103
103
  if (allEmojisByUnified[emojiData[EmojiProperties.unified]]) {
104
104
  return;
105
105
  }
106
106
 
107
107
  allEmojis.push(emojiData);
108
108
  allEmojisByUnified[emojiData[EmojiProperties.unified]] = emojiData;
109
- emojis[Categories.CUSTOM].push(emojiData as never);
110
109
  indexEmoji(emojiData);
111
110
  });
112
111
  }