]> source.dussan.org Git - jquery.git/commitdiff
Shorten the logic for hooks, ternary was unnecessary
authortimmywil <tim.willison@thisismedium.com>
Tue, 29 Mar 2011 04:23:39 +0000 (00:23 -0400)
committertimmywil <tim.willison@thisismedium.com>
Sun, 3 Apr 2011 23:13:41 +0000 (19:13 -0400)
src/attributes.js

index 70eeecfd55bae5941615c27cb5109a3d3ae035a3..e80fede9328e56cc75667ba5115bec16a96ab628 100644 (file)
@@ -301,9 +301,7 @@ jQuery.extend({
 
                // Get the appropriate hook, or the formHook
                // if getSetAttribute is not supported and we have form objects in IE6/7
-               hooks = formHook && ( name === "name" || elem.nodeName === "FORM" ) ?
-                                       jQuery.attrHooks[ name ] || formHook :
-                                       jQuery.attrHooks[ name ];
+               hooks = jQuery.attrHooks[ name ] || ( ( name === "name" || elem.nodeName === "FORM" ) && formHook );
 
                if ( value !== undefined ) {