Skip to content

Commit

Permalink
Merge pull request #1777 from sul-dlss/flat-map
Browse files Browse the repository at this point in the history
  • Loading branch information
mjgiarlo authored Nov 17, 2023
2 parents 39c2b12 + 773df2d commit ab119ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/embed/hierarchical_contents.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def contents
attr_reader :resources

def file_contents
resources.map(&:files).flatten.map { |file| HierarchicalFile.new(file) }
resources.flat_map(&:files).map { |file| HierarchicalFile.new(file) }
end

def add_to_hierarchy(file, root_directory)
Expand Down

0 comments on commit ab119ea

Please sign in to comment.