emoji-picker-react 4.5.9 → 4.5.10

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.9",
2
+ "version": "4.5.10",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -1,6 +1,6 @@
1
1
  import { GetEmojiUrl } from '../components/emoji/BaseEmojiProps';
2
2
  import {
3
- addCustomEmojis,
3
+ setCustomEmojis,
4
4
  emojiUrlByUnified
5
5
  } from '../dataUtils/emojiSelectors';
6
6
  import {
@@ -45,7 +45,7 @@ export function mergeConfig(
45
45
  suggestionMode: config.suggestedEmojisMode
46
46
  });
47
47
 
48
- addCustomEmojis(config.customEmojis ?? []);
48
+ setCustomEmojis(config.customEmojis ?? []);
49
49
 
50
50
  const skinTonePickerLocation = config.searchDisabled
51
51
  ? SkinTonePickerLocation.PREVIEW
@@ -92,7 +92,9 @@ export function emojiByUnified(unified?: string): DataEmoji | undefined {
92
92
 
93
93
  export const allEmojis: DataEmojis = Object.values(emojis).flat();
94
94
 
95
- export function addCustomEmojis(customEmojis: CustomEmoji[]): void {
95
+ export function setCustomEmojis(customEmojis: CustomEmoji[]): void {
96
+ emojis[Categories.CUSTOM] = [];
97
+
96
98
  customEmojis.forEach(emoji => {
97
99
  const emojiData = customToRegularEmoji(emoji);
98
100