We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0e010be + 480a769 commit b382a35Copy full SHA for b382a35
jupyter_ydoc/ydoc.py
@@ -68,6 +68,8 @@ def source(self, value):
68
self._ysource.push(t, value)
69
70
def observe(self, callback):
71
+ self.unobserve()
72
+ self._subscriptions[self._ystate] = self._ystate.observe(callback)
73
self._subscriptions[self._ysource] = self._ysource.observe(callback)
74
75
@@ -139,5 +141,6 @@ def source(self, value):
139
141
140
142
143
self.unobserve()
144
145
self._subscriptions[self._ycells] = self._ycells.observe_deep(callback)
146
self._subscriptions[self._ymeta] = self._ymeta.observe(callback)
0 commit comments