Skip to content

Commit

Permalink
fix(jupyter): keep this around
Browse files Browse the repository at this point in the history
  • Loading branch information
rgbkrk committed Oct 4, 2023
1 parent 9a46a82 commit ee3f358
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cli/tools/jupyter/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -554,14 +554,13 @@ async fn get_jupyter_display(
"Runtime.callFunctionOn",
Some(json!({
"functionDeclaration": r#"function (object) {
const display = object[Symbol.for("Jupyter.display")];
if (typeof display !== "function") {
if (typeof object[Symbol.for("Jupyter.display")] !== "function") {
return null;
}
try {
return JSON.stringify(display());
const representation = object[Symbol.for("Jupyter.display")]();
return JSON.stringify(representation);
} catch {
return null;
}
Expand Down

0 comments on commit ee3f358

Please sign in to comment.