lib/unimatrix/serializer.rb in unimatrix-2.5.0 vs lib/unimatrix/serializer.rb in unimatrix-2.5.1

- old
+ new

@@ -22,10 +22,11 @@ value = object.send( name ) if object.respond_to?( name ) if value.is_a?( Struct ) nested_attributes = value.members nested_attributes.each do | nested_attribute | key = "#{ name }.#{ nested_attribute }" - node_object[ key.to_sym ] = value.send( nested_attribute ) + nested_attribute_value = value.send( nested_attribute ) + node_object[ key.to_sym ] = value.send( nested_attribute ) if value.send( nested_attribute ) end else node_object[ name.to_sym ] = value end end \ No newline at end of file