From ab80153286a7cf59a0d1b2f793088575ec1adbaf Mon Sep 17 00:00:00 2001 From: Rob Sterner Date: Thu, 4 Jan 2024 21:21:42 -0500 Subject: [PATCH] don't try to load the company if there's no current_user --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 585d1d1c..4e89d2c3 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -17,7 +17,7 @@ def current_user helper_method :current_user def current_company - @current_company ||= current_user.current_company + @current_company ||= current_user&.current_company end helper_method :current_company