File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/jupyter_contrib_nbextensions/nbextensions/varInspector Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -144,8 +144,12 @@ function html_table(jsonVars) {
144
144
145
145
function code_exec_callback ( msg ) {
146
146
var jsonVars = msg . content [ 'text' ] ;
147
- if ( jsonVars == undefined ) varInspector_init ( )
148
- //means that msg.text is undefined, that is var_dic_list was cleared ==> need to retart the enxtesnion
147
+ var notWellDefined = false ;
148
+ if ( msg . content . evalue )
149
+ notWellDefined = msg . content . evalue == "name 'var_dic_list' is not defined" ||
150
+ msg . content . evalue . substr ( 0 , 28 ) == "Error in cat(var_dic_list())"
151
+ //means that var_dic_list was cleared ==> need to retart the extension
152
+ if ( notWellDefined ) varInspector_init ( )
149
153
else $ ( '#varInspector' ) . html ( html_table ( jsonVars ) )
150
154
151
155
require ( [ 'nbextensions/varInspector/jquery.tablesorter.min' ] ,
You can’t perform that action at this time.
0 commit comments