--- a/web/data/cubicweb.ajax.js Mon Aug 31 18:55:59 2009 +0200
+++ b/web/data/cubicweb.ajax.js Tue Sep 01 11:02:31 2009 +0200
@@ -390,9 +390,10 @@
/* convenience function that returns a DOM node based on req's result. */
function getDomFromResponse(response) {
if (typeof(response) == 'string') {
- return html2dom(response);
+ var doc = html2dom(response);
+ } else {
+ var doc = response.documentElement;
}
- var doc = response.documentElement;
var children = doc.childNodes;
if (!children.length) {
// no child (error cases) => return the whole document