]> source.dussan.org Git - jquery.git/commitdiff
Do plain property check first, fallback to camelCase only if nec. Fixes #9794 432/head
authorRick Waldron <waldron.rick@gmail.com>
Mon, 25 Jul 2011 18:17:59 +0000 (14:17 -0400)
committerRick Waldron <waldron.rick@gmail.com>
Mon, 25 Jul 2011 18:17:59 +0000 (14:17 -0400)
src/data.js

index 353a0918cc787e7ac7a966c963f8da3865bdc2f1..1e82961fc6a12e2918adc44e648e91530b133890 100644 (file)
@@ -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;