Skip to content

Commit 6583914

Browse files
committed
Fix null component value on initial render
1 parent 47dbcde commit 6583914

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setuptools.setup(
99
name="streamlit-tz",
10-
version="0.1.0",
10+
version="0.1.1",
1111
author="Peter Parente",
1212
author_email="[email protected]",
1313
description="Streamlit component that returns the user browser IANA timezone",

src/streamlit_tz/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
def streamlit_tz(key: Optional[str] = None):
1414
"""Creates a new instance of the streamlit_tz component."""
1515
component_value = _component_func(key=key)
16-
return component_value
16+
return component_value if component_value is not None else "UTC"
1717

1818

1919
def example():

0 commit comments

Comments
 (0)