Don't reassign @user

Co-authored-by: Georg Gadinger <nilsding@nilsding.org>
This commit is contained in:
Karina Kwiatek 2023-11-03 23:32:27 +01:00
parent cfce34365f
commit e95ae7b12e

View file

@ -70,7 +70,7 @@ module ThemeHelper
end end
def active_theme_user def active_theme_user
user = @user ||= @answer&.user user = @user || @answer&.user # rubocop:disable Rails/HelperInstanceVariable
if user&.theme.present? && should_show_foreign_theme? if user&.theme.present? && should_show_foreign_theme?
user user