lib/dry/validation/schema_compiler.rb in dry-validation-0.10.6 vs lib/dry/validation/schema_compiler.rb in dry-validation-0.10.7
- old
+ new
@@ -23,10 +23,12 @@
def deps_valid?(results)
deps.all? do |path|
result = nil
Array(path).each do |name|
curr = results[name]
- result = curr.success? if curr
+ if curr
+ result = curr.is_a?(Array) ? curr.first.success? : curr.success?
+ end
end
result
end
end
end