Fix event chain type check (#375)

This commit is contained in:
Nikhil Rao 2023-01-28 13:12:26 -08:00 committed by GitHub
parent d5a76f103a
commit d15dada09d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -1 +1 @@
0.1.13 0.1.14

View File

@ -162,10 +162,11 @@ class Component(Base, ABC):
Raises: Raises:
ValueError: If the value is not a valid event chain. ValueError: If the value is not a valid event chain.
""" """
# If it's a custom component and var, return it. # If it's an event chain var, return it.
if isinstance(self, CustomComponent): if isinstance(value, Var):
if isinstance(value, Var): if value.type_ is not EventChain:
return value raise ValueError(f"Invalid event chain: {value}")
return value
arg = self.get_controlled_value() arg = self.get_controlled_value()