File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -954,14 +954,22 @@ export function activate(context: vscode.ExtensionContext) {
954954 var data = [ ] ;
955955
956956 if ( result . length > 0 ) {
957- for ( let r of result ) {
958- let stringresult = [ ] ;
959- for ( let v of r . keys ( ) ) { // variables are key in the map
960-
957+ // First populate the list of variables, otherwise we might miss some.
958+ for ( let r of result ) {
959+ for ( let v of r . keys ( ) ) {
961960 if ( ! variables . includes ( v ) ) {
962961 variables . push ( v ) ;
963962 }
964- if ( r . get ( v ) . value != undefined ) {
963+ }
964+ }
965+
966+ for ( let r of result ) {
967+ console . log ( JSON . stringify ( r ) )
968+ let stringresult = [ ] ;
969+ for ( let v of variables ) { // variables are key in the map, we hope.
970+
971+
972+ if ( r . get ( v ) != undefined && r . get ( v ) . value != undefined ) {
965973 stringresult . push ( r . get ( v ) . value ) ;
966974 } else {
967975 stringresult . push ( "" ) ;
@@ -970,7 +978,6 @@ export function activate(context: vscode.ExtensionContext) {
970978 }
971979 data . push ( stringresult ) ;
972980 }
973-
974981 }
975982
976983 // Build a CSV file
You can’t perform that action at this time.
0 commit comments