app/services/blacklight/field_retriever.rb in blacklight-7.34.0 vs app/services/blacklight/field_retriever.rb in blacklight-7.35.0

- old
+ new

@@ -20,20 +20,22 @@ delegate :field, to: :field_config # @return [Array] def fetch - Array.wrap( - if field_config.highlight - retrieve_highlight - elsif field_config.accessor - retieve_using_accessor - elsif field_config.values - retrieve_values - else - retrieve_simple - end - ) + if field_config.highlight + value = retrieve_highlight + end + if value.blank? + value = if field_config.accessor + retieve_using_accessor + elsif field_config.values + retrieve_values + else + retrieve_simple + end + end + Array.wrap(value) end private def retrieve_simple