Skip to content

Commit ff659c8

Browse files
committed
Fix null recordsFiltered on empty collection
Fix #2793
1 parent caa6381 commit ff659c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DataTableAbstract.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ protected function render(array $data): JsonResponse
869869
$output = $this->attachAppends([
870870
'draw' => $this->request->draw(),
871871
'recordsTotal' => $this->totalRecords,
872-
'recordsFiltered' => $this->filteredRecords,
872+
'recordsFiltered' => $this->filteredRecords ?? 0,
873873
'data' => $data,
874874
]);
875875

0 commit comments

Comments
 (0)