Skip to content

Commit

Permalink
Fix loading json with undefined data - #325
Browse files Browse the repository at this point in the history
  • Loading branch information
masayuki0812 committed Jun 6, 2014
1 parent a7cc082 commit 645a034
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
4 changes: 3 additions & 1 deletion c3.js
Original file line number Diff line number Diff line change
Expand Up @@ -1499,7 +1499,9 @@
json.forEach(function (o) {
var new_row = [];
targetKeys.forEach(function (key) {
new_row.push(o[key]);
// convert undefined to null becuase undefined data will be removed in convertDataToTargets()
var v = typeof o[key] === 'undefined' ? null : o[key];
new_row.push(v);
});
new_rows.push(new_row);
});
Expand Down
Loading

0 comments on commit 645a034

Please sign in to comment.