mirror of https://github.com/Textualize/rich.git
more defensive
This commit is contained in:
parent
dbf66e8bb9
commit
1e1a7b4c48
|
@ -254,8 +254,7 @@ class TableElement(MarkdownElement):
|
|||
) -> RenderResult:
|
||||
table = Table(box=box.SIMPLE_HEAVY)
|
||||
|
||||
assert self.header is not None
|
||||
assert self.header.row is not None
|
||||
if self.header is not None and self.header.row is not None:
|
||||
for column in self.header.row.cells:
|
||||
table.add_column(column.content)
|
||||
|
||||
|
|
Loading…
Reference in New Issue