Skip to content

Commit

Permalink
toggl was sometimes returning negative values
Browse files Browse the repository at this point in the history
  • Loading branch information
Swizec committed Jun 7, 2012
1 parent 785f598 commit db278b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions fetching/toggl.js
Expand Up @@ -77,8 +77,9 @@ var parse_data = function (data) {
years.push(year); years.push(year);
} }
_data[key] = data[key].map( _data[key] = data[key].map(
function (a) {return income(a);}).reduce( function (a) {return income(a);}).filter(
function (a,b) {return a+b;}); function (a) {return a>=0;}).reduce(
function (a,b) {return a+b;}, 0);
}); });


Callback(_data); Callback(_data);
Expand Down
1 change: 0 additions & 1 deletion fetching/toshl.js
Expand Up @@ -108,7 +108,6 @@ var parse = function () {
}) })
.on('end', function () { .on('end', function () {
parsed = fix_data(parsed); parsed = fix_data(parsed);
console.log(parsed);


Callback(parsed); Callback(parsed);


Expand Down

0 comments on commit db278b8

Please sign in to comment.