diff options
| author | Misko Hevery | 2010-03-26 16:27:18 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-03-26 16:27:18 -0700 |
| commit | 258ca5f16581f0e8befa493644225a02ae2fc002 (patch) | |
| tree | a7d67c586fb5c870619664ca84e17996f6dd2e6d /src/Formatters.js | |
| parent | 1990cbbf2817e04657ccd616da1d9d6b78cc2949 (diff) | |
| download | angular.js-258ca5f16581f0e8befa493644225a02ae2fc002.tar.bz2 | |
moved all uneeded files out, widgets.html works, tests horribly broken
Diffstat (limited to 'src/Formatters.js')
| -rw-r--r-- | src/Formatters.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Formatters.js b/src/Formatters.js index 6aa832af..f2d5d33e 100644 --- a/src/Formatters.js +++ b/src/Formatters.js @@ -7,12 +7,17 @@ extend(angularFormatter, { 'list':formater( function(obj) { return obj ? obj.join(", ") : obj; }, - function(value) { - return value ? _(_(value.split(',')).map(jQuery.trim)).select(_.identity) : []; + function(value) { + var list = []; + foreach(value.split(','), function(item){ + item = trim(item); + if (item) list.push(item); + }); + return list; } ), 'trim':formater( function(obj) { return obj ? $.trim("" + obj) : ""; } - ) + ) }); |
