]> source.dussan.org Git - jquery.git/commitdiff
Match the codebase standard, .split(" ") => .match( core_rnotwhite ) || []… no matter...
authorRick Waldron <waldron.rick@gmail.com>
Sun, 3 Feb 2013 23:09:49 +0000 (18:09 -0500)
committerRick Waldron <waldron.rick@gmail.com>
Sun, 3 Feb 2013 23:09:49 +0000 (18:09 -0500)
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
src/data.js

index 0b8d71f54c788c92cb7abec64dec47f2d1972fc1..edd6addbee6c1d88465ac51948e97a7d5f9040fd 100644 (file)
@@ -103,10 +103,11 @@ Data.prototype = {
                                        if ( key in cache ) {
                                                name = [ key ];
                                        } else {
-                                               // Split the camel cased version by spaces unless a key with the spaces exists
+                                               // If a key with the spaces exists, use it.
+                                               // Otherwise, create an array by matching non-whitespace
                                                name = camel( key );
                                                name = name in cache ?
-                                                       [ name ] : name.split(" ");
+                                                       [ name ] : ( name.match( core_rnotwhite ) || [] );
                                        }
                                } else {
                                        // If "name" is an array of keys...