Skip to content

Commit 91f0419

Browse files
author
bruce
committed
修复fill参数需要array的问题,提前校验参数,否则会导致页面渲染不成功
1 parent 027a519 commit 91f0419

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Form/Field/Table.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ protected function buildRelatedForms()
5656
if (isset($data['pivot'])) {
5757
$data = array_merge($data, $data['pivot']);
5858
}
59-
$forms[$key] = $this->buildNestedForm($this->column, $this->builder, $key)->fill($data);
59+
if (is_array($data)) {
60+
$forms[$key] = $this->buildNestedForm($this->column, $this->builder, $key)->fill($data);
61+
}
6062
}
6163
}
6264

0 commit comments

Comments
 (0)