Skip to content

Commit 290e5cb

Browse files
committed
fix for TextBox when initialized with an empty text
1 parent 2aefd1a commit 290e5cb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

adafruit_display_text/text_box.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ def __init__(
9494
font,
9595
)
9696

97+
if not kwargs.get("text", ""):
98+
kwargs["text"] = " "
99+
97100
super().__init__(font, **kwargs)
98101

99102
self._text = "\n".join(self.lines)

0 commit comments

Comments
 (0)