lib/mihari/schemas/macros.rb in mihari-6.3.0 vs lib/mihari/schemas/macros.rb in mihari-7.0.0
- old
+ new
@@ -8,10 +8,10 @@
# (see https://github.com/dry-rb/dry-schema/issues/70)
#
class DSL
def default(value)
schema_dsl.before(:rule_applier) do |result|
- result.update(name => value) unless result[name]
+ result.update(name => value) if result.output && !result[name]
end
end
end
end
end