Skip to content

Commit

Permalink
Merge pull request jupyter-widgets#3740 from TTianshun/add_comm_manag…
Browse files Browse the repository at this point in the history
…er_check

add comm_manager check
  • Loading branch information
martinRenou authored Mar 27, 2023
2 parents 93a848b + 83e1c9d commit 05bdab2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/ipywidgets/ipywidgets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def load_ipython_extension(ip):
def register_comm_target(kernel=None):
"""Register the jupyter.widget comm target"""
comm_manager = get_comm_manager()

if comm_manager is None:
return
comm_manager.register_target('jupyter.widget', Widget.handle_comm_opened)
comm_manager.register_target('jupyter.widget.control', Widget.handle_control_comm_opened)

Expand Down

0 comments on commit 05bdab2

Please sign in to comment.