diff --git a/app/assets/javascripts/awards_handler.coffee b/app/assets/javascripts/awards_handler.coffee index a17867f8c9b..aea5d8363db 100644 --- a/app/assets/javascripts/awards_handler.coffee +++ b/app/assets/javascripts/awards_handler.coffee @@ -55,7 +55,6 @@ class @AwardsHandler , 200 addAward: (emoji) -> - emoji = @normilizeEmojiName(emoji) @postEmoji emoji, => @addAwardToEmojiBar(emoji) @@ -64,7 +63,6 @@ class @AwardsHandler addAwardToEmojiBar: (emoji) -> @addEmojiToFrequentlyUsedList(emoji) - emoji = @normilizeEmojiName(emoji) if @exist(emoji) if @isActive(emoji) @decrementCounter(emoji) @@ -165,9 +163,6 @@ class @AwardsHandler scrollTop: $('.awards').offset().top - 80 }, 200) - normilizeEmojiName: (emoji) -> - emoji - addEmojiToFrequentlyUsedList: (emoji) -> frequently_used_emojis = @getFrequentlyUsedEmojis() frequently_used_emojis.push(emoji) diff --git a/lib/award_emoji.rb b/lib/award_emoji.rb index ad78bb530f4..b1aecc2e671 100644 --- a/lib/award_emoji.rb +++ b/lib/award_emoji.rb @@ -53,8 +53,7 @@ class AwardEmoji end def self.unicode - emojis - emojis.map{|key, value| { key => emojis[key]["unicode"] } }.inject(:merge!) + @unicode ||= emojis.map {|key, value| { key => emojis[key]["unicode"] } }.inject(:merge!) end def self.aliases