Skip to content

Commit 51b0f7d

Browse files
authored
special case field in _isinstance (#4298)
1 parent 16ed266 commit 51b0f7d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

reflex/utils/types.py

+6
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,12 @@ def _isinstance(obj: Any, cls: GenericType, nested: bool = False) -> bool:
570570
_isinstance(item, args[0]) for item in obj
571571
)
572572

573+
if args:
574+
from reflex.vars import Field
575+
576+
if origin is Field:
577+
return _isinstance(obj, args[0])
578+
573579
return isinstance(obj, get_base_class(cls))
574580

575581

0 commit comments

Comments
 (0)