diff --git a/src/GridFieldNestedForm.php b/src/GridFieldNestedForm.php index 3e0c13d..a569b3c 100644 --- a/src/GridFieldNestedForm.php +++ b/src/GridFieldNestedForm.php @@ -215,7 +215,7 @@ class GridFieldNestedForm extends AbstractGridFieldComponent implements $this->gridField = $gridField; $relationName = $this->getRelationName(); if (!$record->hasMethod($relationName)) { - return ''; + throw new Exception('Invalid relation name'); } if ($this->canExpandCallback) { if (is_callable($this->canExpandCallback)