File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/jupyter_contrib_nbextensions/nbextensions/varInspector Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -130,15 +130,17 @@ function html_table(jsonVars) {
130
130
var varList = JSON . parse ( String ( jsonVars ) )
131
131
132
132
var shape_str = '' ;
133
+ var has_shape = false ;
133
134
if ( varList . some ( listVar => "varShape" in listVar && listVar . varShape !== '' ) ) { //if any of them have a shape
134
135
shape_str = '<th >Shape</th>' ;
136
+ has_shape = true ;
135
137
}
136
138
var beg_table = '<div class=\"inspector\"><table class=\"table fixed table-condensed table-nonfluid \"><col /> \
137
139
<col /><col /><thead><tr><th >X</th><th >Name</th><th >Type</th><th >Size</th>' + shape_str + '<th >Value</th></tr></thead><tr><td> \
138
140
</td></tr>' ;
139
141
varList . forEach ( listVar => {
140
142
var shape_col_str = '' ;
141
- if ( 'varShape' in listVar ) {
143
+ if ( has_shape ) {
142
144
shape_col_str = '</td><td>' + listVar . varShape + '</td><td>' ;
143
145
}
144
146
beg_table +=
You can’t perform that action at this time.
0 commit comments