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 inner = self.inner(parent);
|
||||||
let cols = inner.cols;
|
let cols = inner.cols;
|
||||||
|
|
||||||
|
// Don't print empty tables.
|
||||||
|
if self.is_empty() {
|
||||||
|
return lines;
|
||||||
|
}
|
||||||
|
|
||||||
if let Some(color) = border {
|
if let Some(color) = border {
|
||||||
lines.push(
|
lines.push(
|
||||||
Line::default()
|
Line::default()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue