diff options
author | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2016-01-15 16:24:16 -0500 |
---|---|---|
committer | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2016-01-18 13:37:26 -0500 |
commit | 62571ae1f221477bd982160fb407bb08d7bc0a8e (patch) | |
tree | e6e29c8b1e188068ad7bc47cf0c05130179ffe34 /app | |
parent | 21ac92b8ba53ba90ccb03b2406435c6cb11b567d (diff) | |
download | gitlab-ce-62571ae1f221477bd982160fb407bb08d7bc0a8e.tar.gz |
Fixes tooltip doesn't duplicate the "me" name.
Checks that "me" is not in the array of names in tooltip
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/awards_handler.coffee | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/app/assets/javascripts/awards_handler.coffee b/app/assets/javascripts/awards_handler.coffee index 9d5ae6c04e9..5ab509b52c1 100644 --- a/app/assets/javascripts/awards_handler.coffee +++ b/app/assets/javascripts/awards_handler.coffee @@ -66,14 +66,10 @@ class @AwardsHandler addMeToAuthorList: (emoji) -> award_block = @findEmojiIcon(emoji).parent() - authors = _.compact(award_block.attr("data-original-title").split(", ")) - authors.push("me") - - if authors.length == 1 - award_block.attr("title", "me") - else - award_block.attr("title", authors.join(", ")) - + authors = award_block.attr("data-original-title").split(", ") + if authors.indexOf("me") == -1 + authors.push("me") + award_block.attr("title", authors.join(", ")) @resetTooltip(award_block) resetTooltip: (award) -> |