Skip to content

Commit 6a37754

Browse files
authored
fix iter parent classe method (#5044)
1 parent ddc27a7 commit 6a37754

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

reflex/components/component.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,9 @@ def _iter_parent_classes_with_method(cls, method: str) -> Iterator[Type[Componen
12361236
Yields:
12371237
The parent classes that define the method (differently than the base).
12381238
"""
1239-
seen_methods = {getattr(Component, method)}
1239+
seen_methods = (
1240+
{getattr(Component, method)} if hasattr(Component, method) else set()
1241+
)
12401242
for clz in cls.mro():
12411243
if clz is Component:
12421244
break

0 commit comments

Comments
 (0)