Skip to content

Commit 28af7fc

Browse files
committed
#1770 ignore the ExtraLazyChoiceLoader if the parent $loader is null
1 parent 80b36bc commit 28af7fc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Autocomplete/src/Form/BaseEntityAutocompleteType.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
3838
public function configureOptions(OptionsResolver $resolver): void
3939
{
4040
$choiceLoader = static function (Options $options, $loader) {
41+
if (null === $loader) {
42+
return null;
43+
}
44+
4145
return new ExtraLazyChoiceLoader($loader);
4246
};
4347

0 commit comments

Comments
 (0)