Skip to content

Commit dfb4a18

Browse files
committed
SPARQL results table now includes all result columns (fixes issue #14)
1 parent 3c95c16 commit dfb4a18

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/extension.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -970,13 +970,13 @@ export function activate(context: vscode.ExtensionContext) {
970970
var data = [];
971971

972972
if (result.length > 0) {
973-
// Iterate over the keys of the first result to obtain the array of variables.
974-
for(let v of result[0].keys()){
975-
variables.push(v);
976-
}
977973
for(let r of result){
978974
let stringresult = [];
979975
for(let v of r.keys()){ // variables are key in the map
976+
977+
if (!variables.includes(v)) {
978+
variables.push(v);
979+
}
980980
if (r.get(v).value != undefined) {
981981
stringresult.push(r.get(v).value);
982982
} else {

0 commit comments

Comments
 (0)