Fix table panic

This commit is contained in:
Laurenz 2022-01-18 13:44:45 +01:00
parent cd7630415f
commit 36cae88799
2 changed files with 5 additions and 1 deletions

View File

@ -67,7 +67,7 @@ impl Layout for TableNode {
let stroke = styles.get(Self::STROKE).map(|paint| Stroke { paint, thickness });
let padding = styles.get(Self::PADDING);
let cols = self.tracks.x.len();
let cols = self.tracks.x.len().max(1);
let children = self
.children
.iter()

View File

@ -7,3 +7,7 @@
thickness: 2pt,
[A], [B], [C], [], [], [D \ E \ F \ \ \ G], [H],
)
---
// Ref: false
#table()