mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Do plain property check first, fallback to camelCase only if nec. Fixes #9794
This commit is contained in:
10
src/data.js
10
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;
|
||||
|
||||
Reference in New Issue
Block a user