Commit a5b02d0a authored by Romain Courteaud's avatar Romain Courteaud

erp5_core: viewer ensure to return a dom element

parent a22e02ce
......@@ -214,13 +214,13 @@
}
}
return html_doc.querySelector('body');
return html_doc.querySelector('body') || domsugar(null);
}
rJS(window)
.declareMethod('render', function (options) {
domsugar(this.element, Array.from(cleanup(options.value).childNodes));
domsugar(this.element, Array.from(cleanup(options.value || '').childNodes));
});
}(window, rJS, domsugar, document, DOMParser, NodeFilter));
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment