Skip to content

Commit

Permalink
Fix ExportCsv blank output
Browse files Browse the repository at this point in the history
Regression from a56c9d3, which results in rows with no columns (since `getColumns` never returns `null`).
  • Loading branch information
ikeblaster authored and paveljanda committed Jan 8, 2021
1 parent d1b8401 commit 84f98d7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Export/ExportCsv.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ private function getExportCallback(
array $data,
DataGrid $grid
) use ($name, $outputEncoding, $delimiter, $includeBom): void {
$columns = $this->getColumns() ?? $this->grid->getColumns();
$columns = $this->getColumns();

if ($columns === []) {
$columns = $this->grid->getColumns();
}

$csvDataModel = new CsvDataModel($data, $columns, $this->grid->getTranslator());

Expand Down

0 comments on commit 84f98d7

Please sign in to comment.