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

Fix loading image from path and add test #3661

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lightpriest
Copy link

This node package implementing atob does not throw if the string is not base64, thus making a call like .addImage('path.jpg', ...) render blank.

I wasn't sure on what the proper fix here, so I conditioned the call to the conversion with a validation on the string. Added a test, though I wasn't really able to run the tests locally. I'm not even sure why they were failing.

Thanks for contributing to jsPDF! Please follow our
Contribution Guidelines
when creating a pull request.

This node package implementing atob does not throw if the string is not base64,
thus making a call like `.addImage('path.jpg', ...`) render blank.

I wasn't sure on what the proper fix here, so I conditioned the call to the
conversion with a validation on the string. Added a test, though I wasn't
really able to run the tests locally. I'm not even sure why they were failing.
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.

None yet

1 participant