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

Prevention of Uncaught TypeError #178

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

Conversation

stefanpols
Copy link

Added an empty check in the convert function. If an empty HTML is given an Uncaught TypeError will be throw at $document->removeChild($htmlElement), because $htmlElement is null instead of a DOMNode instance.

…en an error will be throw at $document->removeChild($htmlElement), because $htmlElement is null instead of a DOMNode instance.
@GrahamCampbell
Copy link
Contributor

I think it's right that it crashes if you give it something that is not html? Maybe we just need to make it crash nicer. ;)

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