Skip to content

Commit c7b05c1

Browse files
authored
Merge pull request #147 from davidbrochart/ypy_0.6.0
Workaround for ypy 0.6.0
2 parents 4ebb4bc + 2b282db commit c7b05c1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jupyter_ydoc/ynotebook.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,10 @@ def set(self, value: Dict) -> None:
247247
self._ystate.pop(t, key)
248248

249249
# initialize document
250-
self._ycells.extend(t, [self.create_ycell(cell) for cell in cells])
250+
# workaround for https://github.com/y-crdt/ypy/issues/126:
251+
# self._ycells.extend(t, [self.create_ycell(cell) for cell in cells])
252+
for cell in cells:
253+
self._ycells.append(t, self.create_ycell(cell))
251254
self._ymeta.set(t, "nbformat", nb.get("nbformat", NBFORMAT_MAJOR_VERSION))
252255
self._ymeta.set(t, "nbformat_minor", nb.get("nbformat_minor", NBFORMAT_MINOR_VERSION))
253256

0 commit comments

Comments
 (0)