aboutsummaryrefslogtreecommitdiffstats
path: root/src/attributes.js
diff options
context:
space:
mode:
authortimmywil <tim.willison@thisismedium.com>2011-03-29 00:23:39 -0400
committertimmywil <tim.willison@thisismedium.com>2011-04-03 19:13:41 -0400
commita4d44979c6ecb4be59f1fbb50a0e5eaae804a0d3 (patch)
treedde8c58cba4f0a3b44da4c7e01ffdf12d572665e /src/attributes.js
parent217a7abc43967cb860fc0dccee13b475de81b07d (diff)
downloadjquery-a4d44979c6ecb4be59f1fbb50a0e5eaae804a0d3.tar.gz
jquery-a4d44979c6ecb4be59f1fbb50a0e5eaae804a0d3.zip
Shorten the logic for hooks, ternary was unnecessary
Diffstat (limited to 'src/attributes.js')
-rw-r--r--src/attributes.js4
1 files changed, 1 insertions, 3 deletions
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 ) {