web/data/cubicweb.ajax.js
branchstable
changeset 6552 256725d4e3ec
parent 6215 759cf097f5aa
child 6556 64b39aa0b047
--- a/web/data/cubicweb.ajax.js	Tue Oct 19 10:04:50 2010 +0200
+++ b/web/data/cubicweb.ajax.js	Tue Oct 19 14:07:52 2010 +0200
@@ -36,12 +36,10 @@
     },
 
     addCallback: function(callback) {
-        if (this._req.readyState == 4) {
-            if (this._result) {
-                var args = [this._result, this._req];
-                jQuery.merge(args, cw.utils.sliceList(arguments, 1));
-                callback.apply(null, args);
-            }
+        if ((this._req.readyState == 4) & this._result) {
+            var args = [this._result, this._req];
+            jQuery.merge(args, cw.utils.sliceList(arguments, 1));
+            callback.apply(null, args);
         }
         else {
             this._onSuccess.push([callback, cw.utils.sliceList(arguments, 1)]);
@@ -332,7 +330,7 @@
         });
         // check result.responseText instead of result to avoid error encountered with IE
         if (result.responseText) {
-            // XXX no good reason to force json here, 
+            // XXX no good reason to force json here,
             // it should depends on request content-type
             result = cw.evalJSON(result.responseText);
         }