Tech Debt: Handle 100 emoji
The following discussion from gitlab-foss!12069 (merged) should be addressed:
-
@iamphill started a discussion: (+1 comment) Is there more than this emoji that is a number? Would it be better to do
${awardName}
so they are all strings?
As explained in slack,
this code is creating a new structure for the emojis:
`{ name: data}`
This code had 2 bugs: The function that transforms the data was creating 2 instances for this emoji, resulting in:
`{ 100: data, "100": data }`
this was causing the bug reported here: http://f.acet.me/QKyk.png
I fixed that part, and now we only save
`{ 100: data }`
`handleAward` is a click callback, of a button created inside a `v-for`. Vue is sending it as a string instead of a number.
I believe this is the only emoji with this problem. I would like not to touch the awards handler code in this MR. But I will open an issue from this discussion to see if we can improve this.
Edited by Filipa Lacerda