about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorTakeshi Umeda <noel.yoshiba@gmail.com>2021-04-14 22:48:49 +0900
committerGitHub <noreply@github.com>2021-04-14 15:48:49 +0200
commitc968d22ee95fd9a37695b896cd86b7608689ead1 (patch)
treed062f963d2742e0ea9fee513525481f188819806 /app/lib
parente78d06eecfb21de6aedf39fd7c63d9aa68f7033c (diff)
Fix an error with 'multiple mentions with same username' (#16038)
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/formatter.rb2
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