improve emoji checking performance
This commit is contained in:
parent
9e4f3147a0
commit
317c928198
849 changed files with 5 additions and 1 deletions
|
@ -128,7 +128,7 @@ module Gitlab
|
|||
#
|
||||
# Returns boolean
|
||||
def valid_emoji?(emoji)
|
||||
File.exists?(Rails.root.join('app', 'assets', 'images', 'emoji', "#{emoji}.png"))
|
||||
Emoji::NAMES.include? emoji
|
||||
end
|
||||
|
||||
# Private: Dispatches to a dedicated processing method based on reference
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue