diff --git a/src/AbstractRepository.php b/src/AbstractRepository.php index 6891174..c761279 100644 --- a/src/AbstractRepository.php +++ b/src/AbstractRepository.php @@ -207,7 +207,7 @@ public function getFormReference(string $field, Form $form): mixed return $this->getReference($data); } - return Arrays::walk($data, fn($id) => yield $id => $this->getReference($id)); + return Arrays::walk($data ?? [], fn($id) => yield $id => $this->getReference($id)); }