Skip to content

Commit

Permalink
Fix session show when navigating as guest
Browse files Browse the repository at this point in the history
  • Loading branch information
andresag4 committed Sep 6, 2024
1 parent fc3933a commit 2d7d407
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def index
end

def show
@user_session_ids = current_user.sessions.pluck(:id)
@user_session_ids = current_user&.sessions&.pluck(:id) || []
@session = if user_signed_in?
sessions.friendly.includes(:location, :tags, speakers: [profile: :image_attachment]).find(params[:id])
else
Expand Down

0 comments on commit 2d7d407

Please sign in to comment.