diff options
author | Takeshi Umeda <noel.yoshiba@gmail.com> | 2021-04-14 22:48:49 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-14 15:48:49 +0200 |
commit | c968d22ee95fd9a37695b896cd86b7608689ead1 (patch) | |
tree | d062f963d2742e0ea9fee513525481f188819806 /app/lib | |
parent | e78d06eecfb21de6aedf39fd7c63d9aa68f7033c (diff) |
Fix an error with 'multiple mentions with same username' (#16038)
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/formatter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb index f13b183ad..fd6537526 100644 --- a/app/lib/formatter.rb +++ b/app/lib/formatter.rb @@ -276,7 +276,7 @@ class Formatter linkable_accounts.each do |item| same_username = item.username.casecmp(username).zero? - same_domain = item.domain.nil? ? domain.nil? : item.domain.casecmp(domain).zero? + same_domain = item.domain.nil? ? domain.nil? : item.domain.casecmp(domain)&.zero? if same_username && !same_domain same_username_hits += 1 |