Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate keys detected: 'hankey'. This may cause an update error. #152

Closed
pellens opened this issue Nov 23, 2021 · 4 comments
Closed

Duplicate keys detected: 'hankey'. This may cause an update error. #152

pellens opened this issue Nov 23, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@pellens
Copy link

pellens commented Nov 23, 2021

When hovering an icon, I get the error:

[Vue warn]: Duplicate keys detected: 'hankey'. This may cause an update error.
found in
---> <Category>
       <Picker>
vue.runtime.esm.js?2b0e:619

Known issue?

@serebrov
Copy link
Owner

serebrov commented Dec 2, 2021

I do not see this in the demo app.
Do you have a code example to reproduce the issue?

@serebrov serebrov added the details needed Not enough details to fix the issue, see https://stackoverflow.com/help/minimal-reproducible-example label Dec 14, 2021
@rasko-lazic
Copy link

rasko-lazic commented Dec 29, 2021

I have encountered the same issue, so I can provide additional details.

For now, only the :hankey: has triggered the bug. It causes multiple renderings of the same emoji in the recent section. For some reason that emoji pops up twice, both as :poop: and :hankey:.
These are the copied values from the emoji-mart.frequently key in local storage:

{
  "+1": 16,
  "grinning": 15,
  "kissing_heart": 14,
  "heart_eyes": 13,
  "laughing": 12,
  "stuck_out_tongue_winking_eye": 11,
  "sweat_smile": 10,
  "joy": 9,
  "scream": 8,
  "disappointed": 7,
  "unamused": 6,
  "weary": 5,
  "sob": 4,
  "sunglasses": 3,
  "heart": 2,
  "poop": 1,
  "hankey": 1
}

In order to replicate the bug, delete both emoji-mart.last and emoji-mart.frequently keys from local storage, and then use :hankey: emoji. Refresh the page, and you should get the emoji two times in the recent section.

@serebrov
Copy link
Owner

serebrov commented Jan 8, 2022

@rasko-lazic Thanks!

I see the issue now: the DEFAULTS list has poop which is a second name for :hankey: emoji (also known as :poop:, also known as :shit:).

There is also no check for alternative emoji names when adding it to the list, so it ends up being listed twice.

As far as I can see, just changing poop to hankey in that DEFAULTS list should fix the issue.

serebrov added a commit that referenced this issue Jan 8, 2022
@serebrov serebrov added bug Something isn't working and removed details needed Not enough details to fix the issue, see https://stackoverflow.com/help/minimal-reproducible-example labels Jan 8, 2022
@serebrov
Copy link
Owner

serebrov commented Jan 8, 2022

I published version 10.2.1 with a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants