Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4f88736e
Commit
4f88736e
authored
Mar 17, 2021
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes the old emoji menu showing a undefined category
Closes
https://gitlab.com/gitlab-org/gitlab/-/issues/324995
parent
b39f2900
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
app/assets/javascripts/emoji/index.js
app/assets/javascripts/emoji/index.js
+4
-1
No files found.
app/assets/javascripts/emoji/index.js
View file @
4f88736e
...
@@ -2,7 +2,7 @@ import { escape, minBy } from 'lodash';
...
@@ -2,7 +2,7 @@ import { escape, minBy } from 'lodash';
import
emojiAliases
from
'
emojis/aliases.json
'
;
import
emojiAliases
from
'
emojis/aliases.json
'
;
import
AccessorUtilities
from
'
../lib/utils/accessor
'
;
import
AccessorUtilities
from
'
../lib/utils/accessor
'
;
import
axios
from
'
../lib/utils/axios_utils
'
;
import
axios
from
'
../lib/utils/axios_utils
'
;
import
{
CATEGORY_ICON_MAP
}
from
'
./constants
'
;
import
{
CATEGORY_ICON_MAP
,
FREQUENTLY_USED_KEY
}
from
'
./constants
'
;
let
emojiMap
=
null
;
let
emojiMap
=
null
;
let
validEmojiNames
=
null
;
let
validEmojiNames
=
null
;
...
@@ -162,6 +162,9 @@ let emojiCategoryMap;
...
@@ -162,6 +162,9 @@ let emojiCategoryMap;
export
function
getEmojiCategoryMap
()
{
export
function
getEmojiCategoryMap
()
{
if
(
!
emojiCategoryMap
)
{
if
(
!
emojiCategoryMap
)
{
emojiCategoryMap
=
CATEGORY_NAMES
.
reduce
((
acc
,
category
)
=>
{
emojiCategoryMap
=
CATEGORY_NAMES
.
reduce
((
acc
,
category
)
=>
{
if
(
category
===
FREQUENTLY_USED_KEY
)
{
return
acc
;
}
return
{
...
acc
,
[
category
]:
[]
};
return
{
...
acc
,
[
category
]:
[]
};
},
{});
},
{});
Object
.
keys
(
emojiMap
).
forEach
((
name
)
=>
{
Object
.
keys
(
emojiMap
).
forEach
((
name
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment