Skip to content

Commit 0ee66d1

Browse files
authored
Merge pull request #53 from mark-git07/null-values-for-floatval
feat: return null value for empty/null strings
2 parents c194b4a + a42ab41 commit 0ee66d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Jobs/DataTableExportJob.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public function handle()
158158
$format = $column->exportFormat ?? $defaultDateFormat;
159159
break;
160160
case $this->wantsNumeric($column):
161-
$cellValue = floatval($value);
161+
$cellValue = ( trim($value) == '' || is_null($value) ) ? null : floatval($value);
162162
$format = $column->exportFormat;
163163
break;
164164
case CellTypeHelper::isDateTimeOrDateInterval($value):

0 commit comments

Comments
 (0)