Skip to content

Commit 4d198c8

Browse files
committed
Fix the exception
1 parent e3f1572 commit 4d198c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jupyter_server_nbmodel/actions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def _output_hook(outputs: list[NotebookNode], ycell: y.Map | None, msg: dict) ->
107107
# FIXME Logic is quite complex at https://github.com/jupyterlab/jupyterlab/blob/7ae2d436fc410b0cff51042a3350ba71f54f4445/packages/outputarea/src/model.ts#L518
108108
if text.endswith((os.linesep, "\n")):
109109
text = text[:-1]
110-
if (not cell_outputs) or (cell_outputs[-1]["name"] != output["name"]):
110+
if (not cell_outputs) or (cell_outputs[-1].get("name", None) != output["name"]):
111111
output["text"] = [text]
112112
cell_outputs.append(output)
113113
else:

0 commit comments

Comments
 (0)