Fixed error when adding a new entry.

This commit is contained in:
Alexis Lahouze 2013-01-24 14:58:09 +01:00
parent 48262fbcc8
commit a7e26e7d96

View File

@ -179,7 +179,9 @@ var ListViewModel = function() {
// Transform to an array readable by jqplot Line renderer. // Transform to an array readable by jqplot Line renderer.
var chartValues = []; var chartValues = [];
$.each(entries, function(index, entry) { $.each(entries, function(index, entry) {
if(entry.value_date && unwrap(entry.value_date)) {
chartValues.push([unwrap(entry.value_date), Number(unwrap(entry.sold))]); chartValues.push([unwrap(entry.value_date), Number(unwrap(entry.sold))]);
}
}); });
return chartValues; return chartValues;