@@ -50,8 +50,11 @@ function exec_cell(c_id) {
5050 let output = ( "global" , eval ) ( vars_in_scope [ id ] . getValue ( ) )
5151 if ( Array . isArray ( output ) ) {
5252 output = print_val ( output )
53- } else if ( typeof output === 'object' && output !== null ) {
53+ } else if ( typeof output == 'object' && output !== null ) {
5454 output = JSON . stringify ( output )
55+ if ( output == "{}" ) {
56+ output = ""
57+ }
5558 } else if ( console ) {
5659 //retreive value from the console funcction
5760 console . oldLog = console . log ;
@@ -66,12 +69,9 @@ function exec_cell(c_id) {
6669 }
6770 }
6871
69- Promise . resolve ( output ) . then ( ( val ) => {
70- $ ( `#out_${ id } ` ) . html ( val ) ;
71- document . getElementById ( "cell_spinner-1" ) . style . display = "none"
72- document . getElementById ( "cell_num-1" ) . style . display = "block"
73- } )
74-
72+ $ ( `#out_${ id } ` ) . html ( output ) ;
73+ document . getElementById ( "cell_spinner-1" ) . style . display = "none"
74+ document . getElementById ( "cell_num-1" ) . style . display = "block"
7575
7676 count = parseInt ( count ) + 1
7777 let div_count = `div-${ count } `
@@ -80,6 +80,8 @@ function exec_cell(c_id) {
8080 } catch ( error ) {
8181 $ ( `#out_${ id } ` ) . html ( error )
8282 console . log ( error )
83+ document . getElementById ( "cell_spinner-1" ) . style . display = "none"
84+ document . getElementById ( "cell_num-1" ) . style . display = "block"
8385
8486 }
8587}
@@ -152,7 +154,7 @@ function add_new_code_cell(c_id, where) {
152154
153155 let editor = CodeMirror ( document . getElementById ( `div-${ new_id } ` ) , {
154156 lineNumbers : true ,
155- tabSize : 2 ,
157+ tabSize : 4 ,
156158 mode : 'javascript' ,
157159 theme : 'monokai' ,
158160 value : '' ,
0 commit comments