Skip to content
Permalink
Browse files

Shorten the logic for hooks, ternary was unnecessary

  • Loading branch information
timmywil
timmywil committed Mar 29, 2011
1 parent 217a7ab commit a4d44979c6ecb4be59f1fbb50a0e5eaae804a0d3
Showing with 1 addition and 3 deletions.
  1. +1 −3 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 ) {

0 comments on commit a4d4497

Please sign in to comment.
You can’t perform that action at this time.