jquery ajax: changing a set of &&/|| for ?/:.
authorAriel Flesler <aflesler@gmail.com>
Sun, 25 May 2008 03:20:13 +0000 (03:20 +0000)
committerAriel Flesler <aflesler@gmail.com>
Sun, 25 May 2008 03:20:13 +0000 (03:20 +0000)
src/ajax.js

index a0c80af..3e43ffb 100644 (file)
@@ -327,9 +327,9 @@ jQuery.extend({
                                        ival = null;
                                }
 
-                               status = isTimeout == "timeout" && "timeout" ||
-                                       !jQuery.httpSuccess( xhr ) && "error" ||
-                                       s.ifModified && jQuery.httpNotModified( xhr, s.url ) && "notmodified" ||
+                               status = isTimeout == "timeout" ? "timeout" :
+                                       !jQuery.httpSuccess( xhr ) ? "error" :
+                                       s.ifModified && jQuery.httpNotModified( xhr, s.url ) ? "notmodified" :
                                        "success";
 
                                if ( status == "success" ) {