Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix: wb.worksheets/wb.eachSheet caused getWorksheet(0) to return sheet #485

Merged
merged 1 commit into from
Feb 28, 2018

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