Skip to content

Commit ee8e89e

Browse files
committed
prevent tag special props from being a shared mutable reference
1 parent 1aafe9a commit ee8e89e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

reflex/components/component.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ def _render(self, props: dict[str, Any] | None = None) -> Tag:
964964
# Create the base tag.
965965
tag = Tag(
966966
name=name,
967-
special_props=self.special_props,
967+
special_props=self.special_props.copy(),
968968
)
969969

970970
if props is None:
@@ -2413,7 +2413,6 @@ def create(cls, component: Component) -> StatefulComponent | None:
24132413
tag_name = cls._get_tag_name(component)
24142414
if tag_name is None:
24152415
return None
2416-
24172416
# Look up the tag in the cache
24182417
stateful_component = cls.tag_to_stateful_component.get(tag_name)
24192418
if stateful_component is None:

0 commit comments

Comments
 (0)