From 57c6f175b442988c2135dc250c39b4c7d8e726be Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Tue, 10 Jul 2018 23:30:55 +0800 Subject: [PATCH] [html-chart] num-columns return 0 for empty-table this commit fixes whereby data is '() indicating no columns --- gnucash/report/report-system/html-table.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnucash/report/report-system/html-table.scm b/gnucash/report/report-system/html-table.scm index 41a615fe35..97615b64ac 100644 --- a/gnucash/report/report-system/html-table.scm +++ b/gnucash/report/report-system/html-table.scm @@ -326,7 +326,7 @@ (record-modifier 'num-rows)) (define (gnc:html-table-num-columns table) - (apply max (map length (gnc:html-table-data table)))) + (apply max (cons 0 (map length (gnc:html-table-data table))))) (define (gnc:html-table-append-row/markup! table markup newrow) (let ((rownum (gnc:html-table-append-row! table newrow)))