Skip to content
New issue

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

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

Already on GitHub? # to your account

Error thrown as context is lost for API methods when using destructuring imports #22

Closed
neocotic opened this issue Nov 3, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@neocotic
Copy link
Owner

neocotic commented Nov 3, 2017

Destructuring imports (which is used in our examples) don't work:

const { createConverter } = require('convert-svg-to-png');
//=> TypeError: Cannot read property 'provider' of undefined

I believe the easiest fix might possibly be to ensure that all public methods in the API class are bound on initialization. Not the tidiest fix, but it should work. Need to get this in ASAP.

@neocotic neocotic added the bug label Nov 3, 2017
@neocotic neocotic added this to the 0.3.1 milestone Nov 3, 2017
@neocotic neocotic self-assigned this Nov 3, 2017
neocotic added a commit that referenced this issue Nov 3, 2017
…t for API methods when using destructuring imports #22
@neocotic neocotic mentioned this issue Nov 3, 2017
1 task
@neocotic
Copy link
Owner Author

neocotic commented Nov 3, 2017

This has been fixed in 9248fca and will be included in the 0.3.1 release.

@neocotic neocotic closed this as completed Nov 3, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant