Skip to content

Commit 455c085

Browse files
committed
simplify
1 parent 97ae5ab commit 455c085

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/textual/layout.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,11 @@ def get_content_height(
256256
Returns:
257257
Content height (in lines).
258258
"""
259-
if not widget._nodes:
260-
height = 0
261-
else:
259+
if widget._nodes:
262260
arrangement = widget._arrange(Size(width, 0))
263261
height = arrangement.total_region.bottom
262+
else:
263+
height = 0
264264

265265
return height
266266

0 commit comments

Comments
 (0)