summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home>2016-01-18 19:27:59 -0500
committerJacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home>2016-01-18 19:27:59 -0500
commitc426a571dbdffcedee4200f5acc56aae02df3bf9 (patch)
tree5803b727cfa924d9d83b6f2ece03456ab2caccd0 /app
parentc298068c45682ad2b75727029872878cd3cc5522 (diff)
downloadgitlab-ce-c426a571dbdffcedee4200f5acc56aae02df3bf9.tar.gz
Fix the situation where the user has named themselves "me"
Stopped looking for existing user since remove functionality is fixed.
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/awards_handler.coffee6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/assets/javascripts/awards_handler.coffee b/app/assets/javascripts/awards_handler.coffee
index 42644229490..7136ef3258b 100644
--- a/app/assets/javascripts/awards_handler.coffee
+++ b/app/assets/javascripts/awards_handler.coffee
@@ -59,8 +59,7 @@ class @AwardsHandler
removeMeFromAuthorList: (emoji) ->
award_block = @findEmojiIcon(emoji).parent()
authors = award_block.attr("data-original-title").split(", ")
- if authors.indexOf("me") != -1
- authors.splice(authors.indexOf("me"),1)
+ authors.splice(authors.indexOf("me"),1)
award_block.closest(".award").attr("data-original-title", authors.join(", "))
@resetTooltip(award_block)
@@ -70,8 +69,7 @@ class @AwardsHandler
authors = []
if origTitle
authors = origTitle.split(', ')
- if authors.indexOf("me") == -1
- authors.push("me")
+ authors.push("me")
award_block.attr("title", authors.join(", "))
@resetTooltip(award_block)