Fix validation of icon field in Component class

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-02-15 16:57:45 -03:00
commit 3ecc492211

View file

@ -36,7 +36,7 @@ class Component:
setattr(self, key, value)
# Validate the emoji at the icon field
if self.icon:
if hasattr(self, "icon") and self.icon:
self.icon = self.validate_icon(self.icon)
def __setattr__(self, key, value):