Skip to content
This repository has been archived by the owner on Mar 27, 2022. It is now read-only.

Commit

Permalink
Don't error if person has no family
Browse files Browse the repository at this point in the history
  • Loading branch information
seven1m committed Feb 18, 2017
1 parent 4ad0558 commit dddda8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/people_controller.rb
Expand Up @@ -33,7 +33,7 @@ def show
if @person == @logged_in
@family_people = @person.family.people.undeleted.where.not(id: @person.id)
else
@family_people = @person.family.visible_people.reject { |p| p.id == @person.id }
@family_people = @person.family ? @person.family.visible_people.reject { |p| p.id == @person.id } : []
end
@albums = @person.albums.order(created_at: :desc)
@friends = @person.friends.minimal
Expand Down

0 comments on commit dddda8e

Please sign in to comment.