Skip to content

Commit

Permalink
Merge pull request minicomp#47 from pbinkley/fix-image-order
Browse files Browse the repository at this point in the history
Sort images by path in multi-image record
  • Loading branch information
mnyrop authored Jun 2, 2020
2 parents 403b4c1 + bcf8649 commit 39f570d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/wax_tasks/item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def assets
if accepted_image_formats.include? @type
[Asset.new(@path, @pid, @variants)]
elsif @type == 'dir'
paths = Dir.glob("#{@path}/*{#{accepted_image_formats.join(',')}}")
paths = Dir.glob("#{@path}/*{#{accepted_image_formats.join(',')}}").sort
paths.map { |p| Asset.new(p, @pid, @variants) }
else
[]
Expand Down

0 comments on commit 39f570d

Please sign in to comment.