Skip to content
Permalink
Browse files

Removing a stale line of code in `.data()`

  • Loading branch information...
gnarf authored and dmethvin committed Nov 6, 2011
1 parent 47c605f commit 471290deb6fd97c6a16cb4d969f277572db7f558
Showing with 12 additions and 10 deletions.
  1. +12 −10 src/data.js
@@ -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 {

// split the camel cased version by spaces
name = jQuery.camelCase( name );
// Support array or space separated string names for data keys
if ( !jQuery.isArray( 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( " " );
}
}
}

0 comments on commit 471290d

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