--- a/web/data/cubicweb.ajax.js Tue Sep 01 18:45:50 2009 +0200
+++ b/web/data/cubicweb.ajax.js Wed Sep 02 10:23:38 2009 +0200
@@ -395,9 +395,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