From cf260fe2858fcc6012a0a9cfa4b794d81c6fb9ad Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Sun, 3 Feb 2013 18:09:49 -0500 Subject: [PATCH] =?utf8?q?Match=20the=20codebase=20standard,=20.split("=20?= =?utf8?q?")=20=3D>=20.match(=20core=5Frnotwhite=20)=20||=20[]=E2=80=A6=20?= =?utf8?q?no=20matter=20how=20awful=20it=20is=20>:|?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Rick Waldron --- src/data.js | 5 +++-- 1 file 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... -- 2.39.5