From: timmywil Date: Tue, 29 Mar 2011 04:23:39 +0000 (-0400) Subject: Shorten the logic for hooks, ternary was unnecessary X-Git-Tag: 1.6b1~27^2~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a4d44979c6ecb4be59f1fbb50a0e5eaae804a0d3;p=jquery.git Shorten the logic for hooks, ternary was unnecessary --- diff --git a/src/attributes.js b/src/attributes.js index 70eeecfd5..e80fede93 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -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 ) {