[js] fix bug encountered with IE (result evaluated to true while no response text -> json parse error)
--- a/web/data/cubicweb.ajax.js Tue Jul 20 14:08:34 2010 +0200
+++ b/web/data/cubicweb.ajax.js Tue Jul 20 14:09:58 2010 +0200
@@ -330,7 +330,8 @@
data: form,
async: false
});
- if (result) {
+ // check result.responseText instead of result to avoid error encountered with IE
+ if (result.responseText) {
// XXX no good reason to force json here,
// it should depends on request content-type
result = cw.evalJSON(result.responseText);