[html-chart] num-columns return 0 for empty-table

this commit fixes whereby data is '() indicating no columns
This commit is contained in:
Christopher Lam 2018-07-10 23:30:55 +08:00
parent e2907844be
commit 57c6f175b4

View File

@ -326,7 +326,7 @@
(record-modifier <html-table> '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)))