Skip to content

Commit f3a5d68

Browse files
Prevent error
1 parent 268c947 commit f3a5d68

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Supports/FormBuilder.php

+4
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,10 @@ protected function request($name): array|string|null
326326

327327
protected function getModelValueAttribute($name): mixed
328328
{
329+
if (! isset($this->model)) {
330+
return null;
331+
}
332+
329333
$key = $this->transformKey($name);
330334

331335
if ((is_string($this->model) || is_object($this->model)) && method_exists($this->model, 'getFormValue')) {

0 commit comments

Comments
 (0)