-
-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Description
In case the parameter 'root' of the method serializeToString of the XMLSerializer class is a DocumentFragment without childs and the used browser does not support the feature JS_XML_SERIALIZER_HTML_DOCUMENT_FRAGMENT_ALWAYS_EMPTY the method will update the parameter root using root.getFirstChild(). In case root has no childs, the new value - after executing root = root.getFirstChild();- is null.
Calling return root.getDomNodeOrDie().asXml(); will create a NullPointerException.
To solve the issue, the method should check after calling root = root.getFirstChild(); that root is not null. In case it is null, it should return an empty string.
Metadata
Metadata
Assignees
Labels
No labels