Skip to content

Commit

Permalink
fix hashable
Browse files Browse the repository at this point in the history
  • Loading branch information
radamson committed Feb 14, 2019
1 parent 6c08227 commit 947466a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/fhir_models/bootstrap/hashable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def from_hash(hash)
if !klass.nil? && !value.nil?
# handle array of objects
if value.is_a?(Array)
value.map! do |child|
value = value.map do |child|
obj = child
unless [FHIR::RESOURCES, FHIR::TYPES].flatten.include? child.class.name.gsub('FHIR::', '')
obj = make_child(child, klass)
Expand All @@ -68,7 +68,7 @@ def from_hash(hash)
FHIR.logger.error("Unhandled and unrecognized class/type: #{meta['type']}")
elsif value.is_a?(Array)
# array of primitives
value.map! { |child| convert_primitive(child, meta) }
value = value.map { |child| convert_primitive(child, meta) }
instance_variable_set("@#{local_name}", value)
else
# single primitive
Expand Down

0 comments on commit 947466a

Please sign in to comment.