lib/schemacop/v3/node.rb in schemacop-3.0.16 vs lib/schemacop/v3/node.rb in schemacop-3.0.17

- old
+ new

@@ -197,13 +197,13 @@ return nil end # Apply default # if data.nil? - if !default.nil? - data = default - else + if default.nil? return nil + else + data = default end end # Validate type # if allowed_types.any? && allowed_types.keys.none? { |c| data.send(type_assertion_method, c) }