From f8b3e662e4cd087e43bbfa53a290f04e636d2c4f Mon Sep 17 00:00:00 2001 From: Yanick Minder Date: Mon, 19 Aug 2024 10:19:41 +0200 Subject: [PATCH] add nullsafe operator --- app/domain/people_search.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/domain/people_search.rb b/app/domain/people_search.rb index 209ac227a..5838123bf 100644 --- a/app/domain/people_search.rb +++ b/app/domain/people_search.rb @@ -48,7 +48,7 @@ def pre_load(people) def in_associations(person) association_symbols.map do |sym| attribute_names = in_association(person, sym) - sym.to_s if attribute_names.any? + sym.to_s if attribute_names&.any? end.flatten end