diff --git a/Resources/views/Form/typeahead.html.twig b/Resources/views/Form/typeahead.html.twig index 0523927..f5636a4 100644 --- a/Resources/views/Form/typeahead.html.twig +++ b/Resources/views/Form/typeahead.html.twig @@ -59,7 +59,11 @@ {% if simple %} {% set _id, _value, _render = child, child, child %} {% else %} - {% set _id, _value, _render = child.id, attribute(child, property ?: 'id'), attribute(child, render) %} + {% if child is null %} + {% set _id, _value, _render = null, null, null %} + {% else %} + {% set _id, _value, _render = child.id, attribute(child, property ?: 'id'), attribute(child, render) %} + {% endif %} {% endif %}