Skip to content

Commit 0702953

Browse files
committed
only import ShareStateBaseInternal if there are links present
1 parent 132b24d commit 0702953

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

reflex/istate/manager/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ async def modify_state_with_links(
131131
Yields:
132132
The state for the token with linked states patched in.
133133
"""
134-
from reflex.istate.shared import SharedStateBaseInternal
135-
136134
async with self.modify_state(token, **context) as root_state:
137135
if getattr(root_state, "_reflex_internal_links", None):
136+
from reflex.istate.shared import SharedStateBaseInternal
137+
138138
shared_state = await root_state.get_state(SharedStateBaseInternal)
139139
async with shared_state._modify_linked_states(
140140
previous_dirty_vars=previous_dirty_vars

0 commit comments

Comments
 (0)