Skip to content
Permalink
Browse files

Do plain property check first, fallback to camelCase only if nec. Fix…

…es #9794
  • Loading branch information...
rwaldron committed Jul 25, 2011
1 parent 84d066f commit 8fed1e7b5e1248c79b06f5f34d286e27c79b3e57
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/data.js
@@ -114,14 +114,14 @@ jQuery.extend({
// If a data property was specified
if ( getByName ) {

// First try to find the camelCased property
ret = thisCache[ jQuery.camelCase( name ) ];
// First Try to find as-is property data
ret = thisCache[ name ];

// Test for null|undefined property data was found
// Test for null|undefined property data
if ( ret == null ) {

// Try to find as-is property data
ret = thisCache[ name ];
// Try to find the camelCased property
ret = thisCache[ jQuery.camelCase( name ) ];
}
} else {
ret = thisCache;

0 comments on commit 8fed1e7

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