Skip to content

Commit

Permalink
Fix bug in sanitize_worksheets if 'sheets' is empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
vanderhoorn committed Jul 20, 2011
1 parent ced383f commit c109f2a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/spreadsheet/excel/writer/workbook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def number_format_index workbook, format
@number_formats[workbook][format] || 0
end
def sanitize_worksheets sheets
return sheets if sheets.blank?
found_selected = false
sheets.each do |sheet|
found_selected ||= sheet.selected
Expand Down

1 comment on commit c109f2a

@zdavatz
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, thanks for the update. Can you add a test as well please? The fix is now in Mainline:

http://scm.ywesee.com/?p=spreadsheet/.git;a=commit;h=1c1746aa5c5897d47f922caf0dea2a15efdc1b49

Best
Zeno

Please sign in to comment.