Skip to content

Commit 953716d

Browse files
Merge pull request #7 from laravel/missing-is-autocompleting-method
Check `isAutoCompleting` before firing it
2 parents 4b96779 + dabf590 commit 953716d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Contexts/Arguments.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public function type(): string
1212
public function castToArray(): array
1313
{
1414
$autocompletingIndex = collect($this->children)->search(
15-
fn ($child) => $child->isAutoCompleting(),
15+
fn ($child) => method_exists($child, 'isAutoCompleting') ? $child->isAutoCompleting() : false,
1616
);
1717

1818
if ($autocompletingIndex === false) {

0 commit comments

Comments
 (0)