Skip to content

Commit 271eb87

Browse files
committed
🐛 [HTML] Use table_data field to get num of columns
1 parent 2df72ef commit 271eb87

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/backends/html/html_backend.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,16 @@ function _html__print(
3939
# Check the dimensions of header cell titles.
4040
if !isnothing(column_label_titles)
4141
num_column_label_rows = length(table_data.column_labels)
42-
num_data_columns = size(table_data.data, 2)
4342

4443
if length(column_label_titles) < num_column_label_rows
4544
error("The number of vectors in `column_label_titles` must be equal or greater than that in `column_labels`.")
4645
end
4746

4847
for k in eachindex(column_label_titles)
49-
if !isnothing(column_label_titles[k]) && (length(column_label_titles[k]) != num_data_columns)
48+
if (
49+
!isnothing(column_label_titles[k]) &&
50+
(length(column_label_titles[k]) != table_data.num_rows)
51+
)
5052
error("The number of elements in each row of `column_label_titles` must match the number of columns in the table.")
5153
end
5254
end

0 commit comments

Comments
 (0)