Fixed headers when exporting visits to CSV

This commit is contained in:
Alejandro Celaya
2021-03-14 18:12:10 +01:00
parent 843f646264
commit 71468379bd
5 changed files with 7 additions and 14 deletions

View File

@@ -13,10 +13,7 @@ export class VisitsExporter {
return;
}
const [ firstVisit ] = visits;
const csv = this.csvjson.toCSV(visits, {
headers: Object.keys(firstVisit).join(','),
});
const csv = this.csvjson.toCSV(visits, { headers: 'key' });
saveCsv(this.window, csv, filename);
};