From a7e26e7d96dbb98f4259c6e40661959fe2667a9a Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Thu, 24 Jan 2013 14:58:09 +0100 Subject: [PATCH] Fixed error when adding a new entry. --- src/html/js/entries.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/html/js/entries.js b/src/html/js/entries.js index 2e20211..1f0b354 100644 --- a/src/html/js/entries.js +++ b/src/html/js/entries.js @@ -179,7 +179,9 @@ var ListViewModel = function() { // Transform to an array readable by jqplot Line renderer. var chartValues = []; $.each(entries, function(index, entry) { - chartValues.push([unwrap(entry.value_date), Number(unwrap(entry.sold))]); + if(entry.value_date && unwrap(entry.value_date)) { + chartValues.push([unwrap(entry.value_date), Number(unwrap(entry.sold))]); + } }); return chartValues;