lib/MESH/tree.rb in mesh-medical-subject-headings-2.0.1 vs lib/MESH/tree.rb in mesh-medical-subject-headings-2.0.2

- old
+ new

@@ -71,11 +71,11 @@ parts = tree_number.split('.') if parts.size > 1 parts.pop parent_tree_number = parts.join '.' parent = @by_tree_number[parent_tree_number] - heading.parents << parent unless parent.nil? - parent.children << heading unless parent.nil? + heading.parents << parent unless parent.nil? || heading.parents.include?(parent) + parent.children << heading unless parent.nil? || parent.children.include?(heading) end end end end \ No newline at end of file