diff options
author | Rick Waldron <waldron.rick@gmail.com> | 2011-07-25 14:17:59 -0400 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2011-07-25 14:17:59 -0400 |
commit | 8fed1e7b5e1248c79b06f5f34d286e27c79b3e57 (patch) | |
tree | 641a1b5e3c62d5170b92c81cf47c591b667f4008 /src | |
parent | 84d066ff7ce38a301fe5cf76a1a79b3a1e754947 (diff) | |
download | jquery-8fed1e7b5e1248c79b06f5f34d286e27c79b3e57.tar.gz jquery-8fed1e7b5e1248c79b06f5f34d286e27c79b3e57.zip |
Do plain property check first, fallback to camelCase only if nec. Fixes #9794
Diffstat (limited to 'src')
-rw-r--r-- | src/data.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/data.js b/src/data.js index 353a0918c..1e82961fc 100644 --- a/src/data.js +++ b/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; |