Skip to content

Conversation

mah110020
Copy link

@mah110020 mah110020 commented Jan 29, 2018

wb._worksheets is an array with an empty first element. Calling wb.worksheets or wb.eachSheet called _worksheets.sort() which mutated the array and shifted the sheets into the empty element slot. I am not sure that the mutation was intentional or necessary. My solution no longer mutates _worksheets.

Also added test.

@mah110020 mah110020 changed the title wb.worksheets and wb.eachSheet caused getWorksheet(0) to return sheet Bug fix: wb.worksheets/wb.eachSheet caused getWorksheet(0) to return sheet Feb 5, 2018
@guyonroche guyonroche merged commit 020b94e into exceljs:master Feb 28, 2018
@guyonroche
Copy link
Collaborator

Nice find - just publishing it now... Thanks @mah110020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants