diff --git a/reflex/vars/object.py b/reflex/vars/object.py index 189c8fd78d..4cd2241be1 100644 --- a/reflex/vars/object.py +++ b/reflex/vars/object.py @@ -22,7 +22,12 @@ from reflex.utils import types from reflex.utils.exceptions import VarAttributeError -from reflex.utils.types import GenericType, get_attribute_access_type, get_origin +from reflex.utils.types import ( + GenericType, + get_attribute_access_type, + get_origin, + safe_issubclass, +) from .base import ( CachedVarOperation, @@ -268,7 +273,7 @@ def __getattr__(self, name: str) -> Var: if ( is_typeddict(fixed_type) - or (isclass(fixed_type) and not issubclass(fixed_type, Mapping)) + or (isclass(fixed_type) and not safe_issubclass(fixed_type, Mapping)) or (fixed_type in types.UnionTypes) ): attribute_type = get_attribute_access_type(var_type, name)