From 93c62a30086a0d0ed35ed1133c7026ca89437429 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sun, 26 Jun 2022 23:41:29 +0200 Subject: [PATCH] Fix `moderation_view?` breaking when not logged in --- app/helpers/user_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/user_helper.rb b/app/helpers/user_helper.rb index 9cde2771..9a33751a 100644 --- a/app/helpers/user_helper.rb +++ b/app/helpers/user_helper.rb @@ -18,7 +18,7 @@ module UserHelper end def moderation_view? - current_user.mod? && session[:moderation_view] == true + current_user&.mod? && session[:moderation_view] == true end private