Skip to content

Commit ab7114c

Browse files
authored
Gracefully handle empty field options (#85)
1 parent c1cca6d commit ab7114c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Fields/Properties/WithOptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ trait WithOptions
88
{
99
protected function optionsProperty(?array $options = null): array
1010
{
11-
$options = $options ?? $this->field->get('options');
11+
$options = $options ?? $this->field->get('options', []);
1212

1313
if (Arr::isAssoc($options)) {
1414
return collect($options)

0 commit comments

Comments
 (0)