CssToInlineStyles
CssToInlineStyles copied to clipboard
Prevention of Uncaught TypeError
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.
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. ;)