diff --git a/app/assets/javascripts/regions.js.coffee b/app/assets/javascripts/regions.js.coffee index b96d0e2a..03c63cb8 100644 --- a/app/assets/javascripts/regions.js.coffee +++ b/app/assets/javascripts/regions.js.coffee @@ -1,9 +1,11 @@ $(document).ready -> $('table.list.dates tbody tr').each -> - vals = $(this).find('td.quantity a').map -> - val = $(this).html().replace(' ', '').trim() - if (val != '') + vals = $(this).find('td.quantity').map -> + val = $(this).find('a').html().replace(' ', '').trim() + if (val && val != '') return parseInt val + else + return 0 $(this).find('.sparkline').sparkline vals, width: '5em'