diff options
author | Hiroyuki Sato <sathiroyuki@gmail.com> | 2018-11-15 20:27:35 +0900 |
---|---|---|
committer | Hiroyuki Sato <sathiroyuki@gmail.com> | 2018-11-15 20:47:52 +0900 |
commit | 428b220a1fd750bf1c3e4f39a2dd670871ad85b6 (patch) | |
tree | 7c62be02303c34b68a65288473e40126bf99c152 /app/assets/javascripts/filtered_search/dropdown_emoji.js | |
parent | 7528b2d26070fcbf3d88b60d54955257dc48141e (diff) | |
download | gitlab-ce-428b220a1fd750bf1c3e4f39a2dd670871ad85b6.tar.gz |
Fix not render emoji in filter dropdown
Diffstat (limited to 'app/assets/javascripts/filtered_search/dropdown_emoji.js')
-rw-r--r-- | app/assets/javascripts/filtered_search/dropdown_emoji.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/assets/javascripts/filtered_search/dropdown_emoji.js b/app/assets/javascripts/filtered_search/dropdown_emoji.js index af7936a92fb..d9a4d06b549 100644 --- a/app/assets/javascripts/filtered_search/dropdown_emoji.js +++ b/app/assets/javascripts/filtered_search/dropdown_emoji.js @@ -69,10 +69,13 @@ export default class DropdownEmoji extends FilteredSearchDropdown { // Replace empty gl-emoji tag to real content const dropdownItems = [...this.dropdown.querySelectorAll('.filter-dropdown-item')]; dropdownItems.forEach(dropdownItem => { - const name = dropdownItem.querySelector('.js-data-value').innerText; - const emojiTag = this.glEmojiTag(name); - const emojiElement = dropdownItem.querySelector('gl-emoji'); - emojiElement.outerHTML = emojiTag; + const valueElement = dropdownItem.querySelector('.js-data-value'); + if (valueElement !== null) { + const name = valueElement.innerText; + const emojiTag = this.glEmojiTag(name); + const emojiElement = dropdownItem.querySelector('gl-emoji'); + emojiElement.outerHTML = emojiTag; + } }); } |