Skip to content

Commit

Permalink
Match the codebase standard, .split(" ") => .match( core_rnotwhite ) …
Browse files Browse the repository at this point in the history
…|| []… no matter how awful it is >:|

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
  • Loading branch information
rwaldron committed Feb 3, 2013
1 parent f506808 commit cf260fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/data.js
Expand Up @@ -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...
Expand Down

0 comments on commit cf260fe

Please sign in to comment.