🐛 fix(custom_component.py): handle case when repr_value is a string in custom_repr method

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-08-04 11:10:29 -03:00
commit b25098e24b

View file

@ -24,6 +24,8 @@ class CustomComponent(Component, extra=Extra.allow):
super().__init__(**data)
def custom_repr(self):
if isinstance(self.repr_value, str):
return self.repr_value
return str(self.repr_value)
def build_config(self):