Removing a stale line of code in .data()

This commit is contained in:
Corey Frang 2011-11-06 17:24:44 -05:00 committed by Dave Methvin
parent 47c605f693
commit 471290deb6

View File

@ -158,19 +158,21 @@ jQuery.extend({
if ( thisCache ) {
// Support space separated names
if ( jQuery.isArray( name ) ) {
name = name;
} else if ( name in thisCache ) {
name = [ name ];
} else {
// Support array or space separated string names for data keys
if ( !jQuery.isArray( name ) ) {
// split the camel cased version by spaces
name = jQuery.camelCase( name );
// try the string as a key before any manipulation
if ( name in thisCache ) {
name = [ name ];
} else {
name = name.split( " " );
// split the camel cased version by spaces unless a key with the spaces exists
name = jQuery.camelCase( name );
if ( name in thisCache ) {
name = [ name ];
} else {
name = name.split( " " );
}
}
}