mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-07 13:07:22 +08:00
avoid unregistering widget model twice
widgets are registered when the comm is created; closing unregisters them. Calling `close` a second time should be a no-op.
This commit is contained in:
parent
6d292040b4
commit
09c1354ea7
@ -164,8 +164,8 @@ class Widget(LoggingConfigurable):
|
||||
Closes the underlying comm.
|
||||
When the comm is closed, all of the widget views are automatically
|
||||
removed from the front-end."""
|
||||
del Widget.widgets[self.model_id]
|
||||
if self._comm is not None:
|
||||
Widget.widgets.pop(self.model_id, None)
|
||||
self._comm.close()
|
||||
self._comm = None
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user