lib/schemacop/v3/hash_node.rb in schemacop-3.0.13 vs lib/schemacop/v3/hash_node.rb in schemacop-3.0.14
- old
+ new
@@ -185,10 +185,10 @@
prop_name = prop.as&.to_s || prop.name
casted_data = prop.cast(data_hash[prop.name])
- if casted_data.present? || data_hash.include?(prop.name)
+ if !casted_data.nil? || data_hash.include?(prop.name)
result[prop_name] = casted_data
end
if result[prop_name].nil? && !data_hash.include?(prop.name) && !as_names.include?(prop.name)
result.delete(prop_name)