Emoji group name causes issues

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

Removing all emoji in the group fixes the issue.

2 Likes

I can reproduce as well. :+1:

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. :thinking:

3 Likes