From: Rick Waldron Date: Sun, 3 Feb 2013 23:09:49 +0000 (-0500) Subject: Match the codebase standard, .split(" ") => .match( core_rnotwhite ) || []… no matter... X-Git-Tag: 2.0.0b2~39 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cf260fe2858fcc6012a0a9cfa4b794d81c6fb9ad;p=jquery.git Match the codebase standard, .split(" ") => .match( core_rnotwhite ) || []… no matter how awful it is >:| Signed-off-by: Rick Waldron --- 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...