Skip to content

Commit 73d3a1d

Browse files
committed
Use proper root_scope() API
1 parent 7e6faf8 commit 73d3a1d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

shinywidgets/_shinywidgets.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ def init_shiny_widget(w: Widget):
6060
return
6161
# Break out of any module-specific session. Otherwise, input.shinywidgets_comm_send
6262
# will be some module-specific copy.
63-
# TODO: session = session.root_scope()
64-
while hasattr(session, "_parent"):
65-
session = cast(Session, session._parent) # pyright: ignore
63+
session = session.root_scope()
6664

6765
# If this is the first time we've seen this session, initialize some things
6866
if session not in SESSIONS:

0 commit comments

Comments
 (0)