diff --git a/reflex/components/core/foreach.py b/reflex/components/core/foreach.py index 46faf16b2..1678642ea 100644 --- a/reflex/components/core/foreach.py +++ b/reflex/components/core/foreach.py @@ -33,7 +33,7 @@ def foreach( Raises: ForeachVarError: If the iterable is of type Any. """ - iterable = LiteralVar.create(iterable) + iterable = LiteralVar.create(iterable).guess_type() if isinstance(iterable, ObjectVar): iterable = iterable.items()