Skip to content

Commit dabf590

Browse files
committed
make sure we have an autocompleting method before we fire it
1 parent 4b96779 commit dabf590

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)