diff options
author | Rick Waldron <waldron.rick@gmail.com> | 2013-02-03 18:09:49 -0500 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2013-02-03 18:09:49 -0500 |
commit | cf260fe2858fcc6012a0a9cfa4b794d81c6fb9ad (patch) | |
tree | 1d36c9feaeeb0860866f3abe714ddc72f03c31f6 | |
parent | f50680898b7560d7e53872a221614ce9c576a7d8 (diff) | |
download | jquery-cf260fe2858fcc6012a0a9cfa4b794d81c6fb9ad.tar.gz jquery-cf260fe2858fcc6012a0a9cfa4b794d81c6fb9ad.zip |
Match the codebase standard, .split(" ") => .match( core_rnotwhite ) || []… no matter how awful it is >:|
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
-rw-r--r-- | src/data.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/data.js b/src/data.js index 0b8d71f54..edd6addbe 100644 --- a/src/data.js +++ b/src/data.js @@ -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... |