diff --git a/lib/deliver/pdf_generator.rb b/lib/deliver/pdf_generator.rb index 2934de3..53ef443 100644 --- a/lib/deliver/pdf_generator.rb +++ b/lib/deliver/pdf_generator.rb @@ -90,7 +90,7 @@ def render(deliverer, export_path = nil) move_cursor_to top if (content[:screenshots] || []).count > 0 - content[:screenshots].sort{ |a, b| a.screen_size <=> b.screen_size }.each do |screenshot| + content[:screenshots].sort_by { |a| [:screen_size, :path] }.each do |screenshot| if last_size and last_size != screenshot.screen_size # Next row (other simulator size)