Commit 471290de authored by Corey Frang's avatar Corey Frang Committed by Dave Methvin

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

parent 47c605f6
...@@ -158,14 +158,15 @@ jQuery.extend({ ...@@ -158,14 +158,15 @@ jQuery.extend({
if ( thisCache ) { if ( thisCache ) {
// Support space separated names // Support array or space separated string names for data keys
if ( jQuery.isArray( name ) ) { if ( !jQuery.isArray( name ) ) {
name = name;
} else if ( name in thisCache ) { // try the string as a key before any manipulation
if ( name in thisCache ) {
name = [ name ]; name = [ name ];
} else { } else {
// split the camel cased version by spaces // split the camel cased version by spaces unless a key with the spaces exists
name = jQuery.camelCase( name ); name = jQuery.camelCase( name );
if ( name in thisCache ) { if ( name in thisCache ) {
name = [ name ]; name = [ name ];
...@@ -173,6 +174,7 @@ jQuery.extend({ ...@@ -173,6 +174,7 @@ jQuery.extend({
name = name.split( " " ); name = name.split( " " );
} }
} }
}
for ( i = 0, l = name.length; i < l; i++ ) { for ( i = 0, l = name.length; i < l; i++ ) {
delete thisCache[ name[i] ]; delete thisCache[ name[i] ];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment