We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 16d22d7 commit 10ff373Copy full SHA for 10ff373
src/Fieldtypes/Arr.php
@@ -108,14 +108,14 @@ public function process($data)
108
109
if ($this->config('expand')) {
110
return collect($data)
111
- ->when($this->isKeyed(), fn ($items) => $items->filter())
+ ->when($this->isKeyed(), fn ($items) => $items->reject(fn ($value) => is_null($value)))
112
->map(fn ($value, $key) => ['key' => $key, 'value' => $value])
113
->values()
114
->all();
115
}
116
117
if ($this->isKeyed()) {
118
- return collect($data)->filter()->all();
+ return collect($data)->reject(fn ($value) => is_null($value))->all();
119
120
121
return $data;
0 commit comments