term: Don't print empty tables
Before this change, the table borders would be printed, as well as the table header if any.
This commit is contained in:
parent
6966c97194
commit
d9fa83f9da
|
|
@ -92,6 +92,11 @@ where
|
|||
let inner = self.inner(parent);
|
||||
let cols = inner.cols;
|
||||
|
||||
// Don't print empty tables.
|
||||
if self.is_empty() {
|
||||
return lines;
|
||||
}
|
||||
|
||||
if let Some(color) = border {
|
||||
lines.push(
|
||||
Line::default()
|
||||
|
|
|
|||
Loading…
Reference in New Issue