fix var in bare (#3873)

This commit is contained in:
Khaleel Al-Adhami 2024-09-03 11:33:54 -07:00 committed by GitHub
parent 853d72e4a5
commit f3426456ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,7 +28,7 @@ class Bare(Component):
"""
if isinstance(contents, ImmutableVar):
return cls(contents=contents)
if isinstance(contents, Var) and contents._get_all_var_data():
if isinstance(contents, Var):
contents = contents.to(str)
else:
contents = str(contents) if contents is not None else ""