Skip to content

Commit

Permalink
Update Python.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchezcarlosjr authored Oct 3, 2023
1 parent a0da4a9 commit 183d29f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/notebook/cellTypes/languages/Python.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ def display(f):
f.canvas.show()
return "<div></div>"
${this.mostRecentCode}`;
instance.runPythonAsync(code).then((output: string) => {
this.write(output);
instance.runPythonAsync(code).then((output: any) => {
if (output) {
this.write(output);
}
this.stop();
}).catch((e: any) => {
this.rewrite(`<pre class="py-error wrap">${e.message}</pre>`);
Expand Down

0 comments on commit 183d29f

Please sign in to comment.