emoji-mart
emoji-mart copied to clipboard
"Frequently used" is broken if `init` function is called first
Repro Steps
-
yarn build
andyarn dev
in the emoji-mart repository. The homepage will show the emoji picker with the Frequently Used section visible. - Now add the line
EmojiMart.init({ data })
to the beginning of the JavaScript code in the example. Exact location where the line of code should be added - Refresh the page and the Frequently Used section will disappear from the picker.
Why it happens
I looked in the code and found that FrequentlyUsed.get()
is only called in the _init
function. This seems wrong to me...
As always, let me know if you want a PR. Thank you.
Here's a hacktacular workaround that we will be using until this bug can be fixed properly: https://github.com/missive/emoji-mart/compare/main...spotxyz:emoji-mart:frequently-used-hack?expand=1