# Emoji group name causes issues

**URL:** https://meta.discourse.org/t/emoji-group-name-causes-issues/295041
**Category:** Bug
**Tags:** emoji
**Created:** [February 12, 2024, 7:12am UTC](https://meta.discourse.org/t/emoji-group-name-causes-issues/295041 "2024-02-12T07:12:21Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![piffy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/piffy/32/254198_2.png) [@piffy](https://meta.discourse.org/u/piffy)
#### Post date: [February 12, 2024, 7:12am UTC](https://meta.discourse.org/t/emoji-group-name-causes-issues/295041/1 "2024-02-12T07:12:21Z")

</div>

To reproduce:

go to /admin/customize/emojis and add a new emoji. Create a new emoji Group called `set` and add the emoji under that set. Emoji name and image is arbitrary.

Now go to any topic and click the reply button. The composer fails to load properly (there is no post button at the bottom). Browser console points here

> Uncaught (in promise) TypeError: groups[emoji.group].push is not a function

> <https://github.com/discourse/discourse/blob/6b596151ff714c57fed50197d995b3981b46c52d/app/assets/javascripts/discourse/app/components/emoji-picker.js#L26>

Removing all emoji in the group fixes the issue.

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [February 12, 2024, 1:39pm UTC](https://meta.discourse.org/t/emoji-group-name-causes-issues/295041/2 "2024-02-12T13:39:59Z")

</div>

I can reproduce as well. 👍

The name “`set`” conflicts with the array prototype functions such as `set()`.

I think an easy fix would be to use an object instead: `const groups = {};` – this should still work in the template. 🤔
