We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 453276a + 1548e48 commit a43b06cCopy full SHA for a43b06c
app/Livewire/ParentChildForm.php
@@ -22,9 +22,9 @@ class ParentChildForm extends Component
22
* @param array $items
23
* @param bool $optional
24
*/
25
- public function mount($items = [''], $optional = false)
+ public function mount(?array $items, bool $optional = false): void
26
{
27
- if (count($items) == 0) {
+ if (is_null($items) || count($items) == 0) {
28
$items = [''];
29
}
30
$this->items = $items;
0 commit comments