File tree Expand file tree Collapse file tree
notebookjs/src/public/javascripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,22 +50,27 @@ 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- }
54- else if ( typeof output === 'object' && output !== null ) {
53+ } else if ( typeof output === 'object' && output !== null ) {
5554 output = JSON . stringify ( output )
56- }
57- else if ( console ) {
55+ if ( output == "{}" ) {
56+ output = ""
57+ }
58+ } else if ( console ) {
5859 //retreive value from the console funcction
5960 console . oldLog = console . log ;
6061 console . log = function ( value ) {
6162 return value ;
6263 } ;
6364 output = eval ( vars_in_scope [ id ] . getValue ( ) ) ;
65+
6466 if ( Array . isArray ( output ) ) {
6567 output = print_val ( output )
6668 } else {
6769 if ( typeof output === 'object' && output !== null ) {
6870 output = JSON . stringify ( output )
71+ if ( output == "{}" ) {
72+ output = ""
73+ }
6974 }
7075
7176 }
You can’t perform that action at this time.
0 commit comments