diff --git a/platform/features/timeline/src/actions/ExportTimelineAsCSVTask.js b/platform/features/timeline/src/actions/ExportTimelineAsCSVTask.js index 8a0b60ca94..790b165fd7 100644 --- a/platform/features/timeline/src/actions/ExportTimelineAsCSVTask.js +++ b/platform/features/timeline/src/actions/ExportTimelineAsCSVTask.js @@ -45,9 +45,10 @@ define([ var exportService = this.exportService; function doExport(objects) { - var exporter = new TimelineCSVExporter(objects); + var exporter = new TimelineCSVExporter(objects), + options = { headers: exporter.headers() }; return exporter.rows().then(function (rows) { - return exportService.exportCSV(rows, exporter.options()); + return exportService.exportCSV(rows, options); }); } diff --git a/platform/features/timeline/src/actions/TimelineCSVExporter.js b/platform/features/timeline/src/actions/TimelineCSVExporter.js index bc73d6f782..3ebe37db1c 100644 --- a/platform/features/timeline/src/actions/TimelineCSVExporter.js +++ b/platform/features/timeline/src/actions/TimelineCSVExporter.js @@ -93,12 +93,10 @@ define([ return Promise.all(this.domainObjects.map(toRow)); }; - TimelineCSVExporter.prototype.options = function () { - return { - headers: this.columns.map(function (column) { - return column.name(); - }) - }; + TimelineCSVExporter.prototype.headers = function () { + return this.columns.map(function (column) { + return column.name(); + }); }; return TimelineCSVExporter;