Skip to content

Commit

Permalink
fix - return nil is needed [#89]
Browse files Browse the repository at this point in the history
  • Loading branch information
Anna Anks Nowak committed Mar 22, 2016
1 parent 3563cb5 commit 180eab7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def extract_locale_from_accept_language_header
end

def current_person
return nil if session[:account_id].blank?
if session[:account_type] == "facebook_account"
@current_user ||= FacebookAccount.find_by(id: session[:account_id]).person
elsif session[:account_type] == "account"
Expand Down

0 comments on commit 180eab7

Please sign in to comment.