diff --git a/reflex/utils/types.py b/reflex/utils/types.py index 0b51cb432..9361c1ce4 100644 --- a/reflex/utils/types.py +++ b/reflex/utils/types.py @@ -18,6 +18,7 @@ from typing import ( Iterable, List, Literal, + Mapping, Optional, Sequence, Tuple, @@ -523,7 +524,7 @@ def does_obj_satisfy_typed_dict(obj: Any, cls: GenericType) -> bool: Returns: Whether the object satisfies the typed dict. """ - if not isinstance(obj, dict): + if not isinstance(obj, Mapping): return False key_names_to_values = get_type_hints(cls)