Skip to content

Commit 142054a

Browse files
committed
Fixes issue where label will not display when value is False
If text value evaluates to False, label will not display. This change resolves that issue. Tested with proximity data that returns 0 when no object is present.
1 parent 36e199a commit 142054a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_display_text/label.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def __init__(self, font, *, text=None, max_glyphs=None, color=0xffffff,
7979
self._line_spacing = line_spacing
8080
self._boundingbox = None
8181

82-
if text:
82+
if text is not None:
8383
self._update_text(str(text))
8484

8585

0 commit comments

Comments
 (0)