]> cat aescling's git repositories - mastodon.git/commitdiff
Fix admin interface crash when displaying deleted user (#17301)
authorClaire <claire.github-309c@sitedethib.com>
Sun, 16 Jan 2022 19:57:37 +0000 (20:57 +0100)
committerGitHub <noreply@github.com>
Sun, 16 Jan 2022 19:57:37 +0000 (20:57 +0100)
app/helpers/admin/dashboard_helper.rb

index d4a30b97eb4abe1c6da5f41854025aec86963592..c21d4134190ad25ce14bb942e02e64e5f78a08b3 100644 (file)
@@ -2,7 +2,7 @@
 
 module Admin::DashboardHelper
   def relevant_account_ip(account, ip_query)
-    ips = account.user.ips.to_a
+    ips = account.user.present? ? account.user.ips.to_a : []
 
     matched_ip = begin
       ip_query_addr = IPAddr.new(ip_query)