app/services/hyrax/simple_schema_loader.rb in hyrax-3.3.0 vs app/services/hyrax/simple_schema_loader.rb in hyrax-3.4.0
- old
+ new
@@ -74,10 +74,14 @@
end
##
# @return [Dry::Types::Type]
def type
- collection_type = config['multiple'] ? Valkyrie::Types::Array : Identity
+ collection_type = if config['multiple']
+ Valkyrie::Types::Array.constructor { |v| Array(v).select(&:present?) }
+ else
+ Identity
+ end
collection_type.of(type_for(config['type']))
end
##
# @api private