]> cat aescling's git repositories - mastodon.git/commitdiff
Fix formatter return block
authorEugen Rochko <eugen@zeonfederated.com>
Sat, 10 Sep 2016 17:18:17 +0000 (19:18 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Sat, 10 Sep 2016 17:18:17 +0000 (19:18 +0200)
app/lib/formatter.rb

index 12b141e7e78d9873b371189bba7de4dd73ecf58b..ad0f022a759f46a8c2f6448e3798ab46847a6b40 100644 (file)
@@ -37,8 +37,7 @@ class Formatter
       acct    = Account::MENTION_RE.match(match)[1]
       mention = mentions.find { |mention| mention.account.acct.eql?(acct) }
 
-      return match if mention.nil?
-      mention_html(match, mention.account)
+      mention.nil? ? match : mention_html(match, mention.account)
     end
   end